|
@@ -9,12 +9,15 @@ import com.gree.mall.manager.bean.admin.AdminWebsitVO;
|
|
|
import com.gree.mall.manager.commonmapper.AdminMapper;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
+import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
|
|
|
import com.gree.mall.manager.plus.entity.AdminCompanyWechatPayConfig;
|
|
|
import com.gree.mall.manager.plus.entity.AdminWebsit;
|
|
|
import com.gree.mall.manager.plus.entity.AdminZone;
|
|
|
import com.gree.mall.manager.plus.service.AdminCompanyWechatPayConfigService;
|
|
|
+import com.gree.mall.manager.plus.service.AdminCompanyWechatService;
|
|
|
import com.gree.mall.manager.plus.service.AdminWebsitService;
|
|
|
import com.gree.mall.manager.plus.service.AdminZoneService;
|
|
|
+import com.gree.mall.manager.utils.StringUtil;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -44,6 +47,9 @@ public class AdminWebsitLogic {
|
|
|
AdminMapper adminMapper;
|
|
|
|
|
|
@Autowired
|
|
|
+ AdminCompanyWechatService adminCompanyWechatService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
AdminCompanyWechatPayConfigService adminCompanyWechatPayConfigService;
|
|
|
|
|
|
/**
|
|
@@ -96,12 +102,18 @@ public class AdminWebsitLogic {
|
|
|
if(adminWebsit.getParentId() == 0){
|
|
|
throw new RemoteServiceException("请选择父部门");
|
|
|
}
|
|
|
+ if (StringUtil.isEmpty(adminWebsit.getCompanyWechatId()))
|
|
|
+ throw new RemoteServiceException("上级商家不能为空");
|
|
|
+ AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getById(adminWebsit.getPayWorkerCodeId());
|
|
|
+ AdminCompanyWechat adminCompanyWechatP = adminCompanyWechatService.getById(adminWebsit.getCompanyWechatId());
|
|
|
|
|
|
//Long aLong = workWechatLogic.addOrganization(adminWebsit.getName(), adminWebsit.getParentId(),adminUser.getAdminCompanyWechat());
|
|
|
String aLong = IdWorker.getIdStr();
|
|
|
adminWebsit.setWebsitId(aLong+"");
|
|
|
// adminWebsit.setCorpId(adminUser.getCorpIds().get(0));
|
|
|
adminWebsit.setWebsitId(aLong);
|
|
|
+ adminWebsit.setCompanyName(adminCompanyWechatP.getCompanyName());
|
|
|
+ adminWebsit.setPayWorkerCodeName(adminCompanyWechat.getCompanyName());
|
|
|
adminWebsit.insert();
|
|
|
|
|
|
}
|
|
@@ -125,7 +137,15 @@ public class AdminWebsitLogic {
|
|
|
}
|
|
|
if(adminWebsit.getParentId() == 0){
|
|
|
throw new RemoteServiceException("请选择父部门");
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+ if (StringUtil.isEmpty(adminWebsit.getCompanyWechatId()))
|
|
|
+ throw new RemoteServiceException("上级商家不能为空");
|
|
|
+ AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getById(adminWebsit.getPayWorkerCodeId());
|
|
|
+ AdminCompanyWechat adminCompanyWechatP = adminCompanyWechatService.getById(adminWebsit.getCompanyWechatId());
|
|
|
+ adminWebsit.setCompanyName(adminCompanyWechatP.getCompanyName());
|
|
|
+ adminWebsit.setPayWorkerCodeName(adminCompanyWechat.getCompanyName());
|
|
|
adminWebsit.updateById();
|
|
|
//workWechatLogic.updateOrganization(adminWebsit.getWebsitId(),adminWebsit.getName(),adminWebsit.getParentId(),adminUser.getAdminCompanyWechat());
|
|
|
|