|
@@ -82,6 +82,8 @@ public class AdminWebsitLogic {
|
|
AdminUserService adminUserService;
|
|
AdminUserService adminUserService;
|
|
@Autowired
|
|
@Autowired
|
|
AdminWebsitBakService adminWebsitBakService;
|
|
AdminWebsitBakService adminWebsitBakService;
|
|
|
|
+ @Autowired
|
|
|
|
+ SysDictCompanyService sysDictCompanyService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 区域列表
|
|
* 区域列表
|
|
@@ -323,10 +325,18 @@ public class AdminWebsitLogic {
|
|
}
|
|
}
|
|
|
|
|
|
if (adminWebsit.getType().equals(AdminWebsitTypeEnum.C.getKey())) {
|
|
if (adminWebsit.getType().equals(AdminWebsitTypeEnum.C.getKey())) {
|
|
- if (org.apache.commons.lang3.StringUtils.isBlank(adminWebsit.getBelongCompany())
|
|
|
|
- || org.apache.commons.lang3.StringUtils.isBlank(adminWebsit.getBelongCompanyCode()) ) {
|
|
|
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isBlank(adminWebsit.getBelongCompanyCode())) {
|
|
throw new RemoteServiceException("所属公司不能为空");
|
|
throw new RemoteServiceException("所属公司不能为空");
|
|
}
|
|
}
|
|
|
|
+ final SysDictCompany dictCompany = sysDictCompanyService.lambdaQuery()
|
|
|
|
+ .eq(SysDictCompany::getCompanyWechatId, adminWebsit.getCompanyWechatId())
|
|
|
|
+ .eq(SysDictCompany::getDictType, "BELONG_COMPANY")
|
|
|
|
+ .eq(SysDictCompany::getDictCode, adminWebsit.getBelongCompanyCode())
|
|
|
|
+ .one();
|
|
|
|
+ if (Objects.isNull(dictCompany)) {
|
|
|
|
+ throw new RemoteServiceException("所属公司不存在");
|
|
|
|
+ }
|
|
|
|
+ adminWebsit.setBelongCompany(dictCompany.getDictValue());
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isBlank(adminWebsit.getAttr())) {
|
|
if (org.apache.commons.lang3.StringUtils.isBlank(adminWebsit.getAttr())) {
|
|
throw new RemoteServiceException("网点属性不能为空");
|
|
throw new RemoteServiceException("网点属性不能为空");
|