|
@@ -8,6 +8,7 @@ import com.gree.mall.manager.bean.ExcelData;
|
|
|
import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
|
import com.gree.mall.manager.bean.admin.AdminWebsitNewBean;
|
|
|
import com.gree.mall.manager.bean.admin.AdminWebsitTree;
|
|
|
+import com.gree.mall.manager.bean.admin.reqDto.AdminUserAddReqBean;
|
|
|
import com.gree.mall.manager.bean.workorder.AdminWebsitList;
|
|
|
import com.gree.mall.manager.enums.ExamineStatusEnum;
|
|
|
import com.gree.mall.manager.enums.admin.AdminWebsitTypeEnum;
|
|
@@ -69,6 +70,8 @@ public class AdminWebsitLogic {
|
|
|
|
|
|
@Autowired
|
|
|
WebsitDispatchService websitDispatchService;
|
|
|
+ @Resource
|
|
|
+ AdminUserLogic adminUserLogic;
|
|
|
// @Autowired
|
|
|
// EnterpriseWechatWorkerLogic enterpriseWechatWorkerLogic;
|
|
|
|
|
@@ -235,6 +238,25 @@ public class AdminWebsitLogic {
|
|
|
adminDeptWebsit.setWebsitName(adminWebsit.getName());
|
|
|
adminDeptWebsit.setDeptName(adminDept.getDeptName());
|
|
|
adminDeptWebsit.insert();
|
|
|
+
|
|
|
+ // 网点新增账号
|
|
|
+ if (adminWebsit.getType().equals(AdminWebsitTypeEnum.C.getKey()))
|
|
|
+ this.addAdminUser(adminWebsit);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void addAdminUser(AdminWebsitNewBean adminWebsit) {
|
|
|
+ AdminUserAddReqBean adminUser = new AdminUserAddReqBean();
|
|
|
+ adminUser.setCompanyWechatId(adminWebsit.getCompanyWechatId())
|
|
|
+ .setCompanyName(adminWebsit.getCompanyWechatName())
|
|
|
+ .setUserName(adminWebsit.getWebsitId())
|
|
|
+ .setNickName(adminWebsit.getName())
|
|
|
+ .setRoleId("1831614042544427009")
|
|
|
+ .setPassword(adminWebsit.getWebsitPhone())
|
|
|
+ .setPubNotice(true)
|
|
|
+ .setIsVender(false)
|
|
|
+ .setLinkPhone(adminWebsit.getWebsitPhone());
|
|
|
+ adminUser.setAdminWebsitId(Collections.singletonList(adminWebsit.getWebsitId()));
|
|
|
+ adminUserLogic.add(adminUser, false);
|
|
|
}
|
|
|
|
|
|
private void initMaterialStorage(AdminUserCom adminUser, AdminWebsit adminWebsit) {
|
|
@@ -708,7 +730,6 @@ public class AdminWebsitLogic {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
for (AdminWebsit websit : adminWebsitList) {
|
|
|
reloadJoinCode(websit.getCompanyWechatId(), websit.getJoinCode());
|
|
|
|
|
@@ -724,11 +745,18 @@ public class AdminWebsitLogic {
|
|
|
adminDeptWebsit.setWebsitName(websit.getName());
|
|
|
adminDeptWebsit.setDeptName(adminDept.getDeptName());
|
|
|
adminDeptWebsit.insert();
|
|
|
- }
|
|
|
|
|
|
+ // 网点新增账号
|
|
|
+ if (websit.getType().equals(AdminWebsitTypeEnum.C.getKey())) {
|
|
|
+ AdminWebsitNewBean reqBean = new AdminWebsitNewBean();
|
|
|
+ BeanUtils.copyProperties(websit, reqBean);
|
|
|
+ this.addAdminUser(reqBean);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (CollectionUtil.isNotEmpty(allPayConfigList)) {
|
|
|
adminWebsitPayConfigService.saveBatch(allPayConfigList);
|
|
|
}
|
|
|
+
|
|
|
adminWebsitService.saveBatch(adminWebsitList);
|
|
|
}
|
|
|
}
|