|
|
@ -1238,25 +1238,26 @@ public class StoreEmployeeService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> domainMap = new HashMap<>();
|
|
|
|
Map<String, Object> domainMap = new HashMap<>();
|
|
|
|
domainMap.put("name", poiStore.getCustomerName());
|
|
|
|
domainMap.put("org_id", parent.getId());
|
|
|
|
List<PrivilageDomainDO> domainList = privilageDomainDOMapper.selectByMap(domainMap);
|
|
|
|
List<PrivilageOrganizationalDomain> domainList = privilageOrganizationalDomainMapper.selectByMap(domainMap);
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(domainList)) {
|
|
|
|
if (CollectionUtils.isEmpty(domainList)) {
|
|
|
|
throw new KiisooException(Constants.MSG_ORGANIZATIONAL_NO, Constants.CODE_ORGANIZATIONAL_NO);
|
|
|
|
throw new KiisooException(Constants.MSG_ORGANIZATIONAL_NO, Constants.CODE_ORGANIZATIONAL_NO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PrivilageDomainDO domain = domainList.get(0);
|
|
|
|
PrivilageOrganizationalDomain domain = domainList.get(0);
|
|
|
|
|
|
|
|
|
|
|
|
//找到区域域
|
|
|
|
//找到区域域
|
|
|
|
Map<String, Object> domainEntityMap = new HashMap<>();
|
|
|
|
Map<String, Object> domainEntityMap = new HashMap<>();
|
|
|
|
domainEntityMap.put("entity_id", poiStore.getId());
|
|
|
|
domainEntityMap.put("entity_id", poiStore.getId());
|
|
|
|
|
|
|
|
domainEntityMap.put("domain_id", domain.getDomainId());
|
|
|
|
List<PrivilageDomainEntityDO> domainEntityList = privilageDomainEntityDOMapper.selectByMap(domainEntityMap);
|
|
|
|
List<PrivilageDomainEntityDO> domainEntityList = privilageDomainEntityDOMapper.selectByMap(domainEntityMap);
|
|
|
|
if (domainEntityList.size() > 1) {
|
|
|
|
if (domainEntityList.size() > 1) {
|
|
|
|
throw new KiisooException(Constants.MSG_DOMAIN_ENTITY_HAS, Constants.CODE_DOMAIN_ENTITY_HAS);
|
|
|
|
throw new KiisooException(Constants.MSG_DOMAIN_ENTITY_HAS, Constants.CODE_DOMAIN_ENTITY_HAS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PrivilageDomainEntityDO privilageDomainEntityDO = new PrivilageDomainEntityDO();
|
|
|
|
PrivilageDomainEntityDO privilageDomainEntityDO = new PrivilageDomainEntityDO();
|
|
|
|
privilageDomainEntityDO.setDomainId(domain.getId());
|
|
|
|
privilageDomainEntityDO.setDomainId(domain.getDomainId());
|
|
|
|
privilageDomainEntityDO.setEntityId(poiStore.getId());
|
|
|
|
privilageDomainEntityDO.setEntityId(poiStore.getId());
|
|
|
|
privilageDomainEntityDO.setType(3);
|
|
|
|
privilageDomainEntityDO.setType(3);
|
|
|
|
privilageDomainEntityDO.setCreateTime(new Date());
|
|
|
|
privilageDomainEntityDO.setCreateTime(new Date());
|
|
|
|