‘linchangsheng’ il y a 5 mois
Parent
commit
7747c3687f

+ 17 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/LetterLogic.java

@@ -78,10 +78,13 @@ public class LetterLogic {
     }
 
     public void add(LeDepartment leDepartment) {
+        AdminUserCom adminUser = commonLogic.getAdminUser();
 
         if (leDepartmentService.lambdaQuery().eq(LeDepartment::getDapartment,leDepartment.getDapartment()).count() > 0)
             throw new RemoteServiceException("重复科室名称");
 
+        leDepartment.setCompanyWechatId(adminUser.getCompanyWechatId());
+        leDepartment.setCompanyWechatName(adminUser.getCompanyName());
         leDepartment.insert();
     }
 
@@ -124,6 +127,12 @@ public class LetterLogic {
             throw new RemoteServiceException("该账号设置过科室");
         }
 
+        AdminUserCom adminUser = commonLogic.getAdminUser();
+
+        leUserDepartment.setCompanyWechatName(adminUser.getCompanyName());
+        leUserDepartment.setCompanyWechatId(adminUser.getCompanyWechatId());
+
+
         leUserDepartment.insert();
 
     }
@@ -225,6 +234,10 @@ public class LetterLogic {
     }
 
     public void addProject(LeProject leProject) {
+        AdminUserCom adminUser = commonLogic.getAdminUser();
+        leProject.setCompanyWechatName(adminUser.getCompanyName());
+        leProject.setCompanyWechatId(adminUser.getCompanyWechatId());
+
         leProject.insert();
     }
 
@@ -262,6 +275,10 @@ public class LetterLogic {
     }
 
     public void addLetter(LeLetter leLetter) {
+
+        AdminUserCom adminUser = commonLogic.getAdminUser();
+        leLetter.setCompanyWechatName(adminUser.getCompanyName());
+        leLetter.setCompanyWechatId(adminUser.getCompanyWechatId());
         leLetter.insert();
     }