duyj vor 3 Jahren
Ursprung
Commit
227f3169a2

+ 4 - 2
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxController.java

@@ -480,10 +480,12 @@ public class WxController extends ApiBaseController {
         String pass = EncryptPassWordClass.encryptPassword(user.getLoginName(),password,user.getSalt());
         if(pass.equals(user.getPassword())){
             List<Ztree>  author = sysUserOrderAuthorService.userAuthorTreeDataFmt(user.getUserId());
-            if (author.size() > 0 && author.get(0).getChildren().size() == 3) {
+            if (author.size() > 0 && author.get(0).getChildren().size() > 1) {
                 user.setAuthorType("TUC");
+            } else if (author.size() > 0 && author.get(0).getChildren().size() == 1) {//设置BUSINESS_UNIT
+                user.setAuthorType(author.get(0).getChildren().get(0).getCode());
             }else{
-                user.setAuthorType("");
+                user.setAuthorType("DIY");//默认diy
             }
             user.setAuthor(author);
             return AjaxResult.success().putKV("sysUser",user);