‘linchangsheng’ 11 місяців тому
батько
коміт
83f579efbe

+ 6 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/admin/AdminUserLogic.java

@@ -292,6 +292,7 @@ public class AdminUserLogic {
     /**
      * 修改帐号
      */
+    @Transactional(rollbackFor = Exception.class)
     public void update(HttpServletRequest request, AdminUserAddReqBean newUser) {
 
         AdminUserCom admin = commonLogic.getAdminUser(request);
@@ -329,12 +330,16 @@ public class AdminUserLogic {
                 newUser.setType(2);
             }
         }else {
-            AdminDept adminDept = adminDeptService.getById(newUser.getAdminDeptId());
+
+            if (!StringUtil.isEmpty(newUser.getAdminDeptId())){
+
+                AdminDept adminDept = adminDeptService.getById(newUser.getAdminDeptId());
 
             newUser.setCompanyWechatId(adminDept.getCompanyWechatId());
             newUser.setCompanyName(adminDept.getCompanyWechatName());
 
             newUser.setType(0);
+            }
         }