duyj %!s(int64=2) %!d(string=hai) anos
pai
achega
6225e96054

+ 14 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/SysUser.java

@@ -4,6 +4,7 @@ import java.util.Date;
 import java.util.List;
 import javax.validation.constraints.*;
 
+import com.dgtly.common.core.domain.Ztree;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -127,6 +128,11 @@ public class SysUser extends BaseEntity
     /** 是否同步 */
     private String  isSync;
 
+    /**
+     * 订单在线权限
+     */
+    private List<Ztree>  author;
+
     //    /** 所属销售组织等级 详见字典(sales_level) */
 //    private String salesLevel;
 //
@@ -141,6 +147,14 @@ public class SysUser extends BaseEntity
 
     }
 
+    public List<Ztree> getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(List<Ztree> author) {
+        this.author = author;
+    }
+
     public SysUser(Long userId)
     {
         this.userId = userId;

+ 6 - 0
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxController.java

@@ -6,9 +6,11 @@ import com.dgtly.common.annotation.ApiPassToken;
 import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
+import com.dgtly.common.core.domain.Ztree;
 import com.dgtly.common.utils.http.HttpUtils;
 import com.dgtly.common.utils.security.EncryptPassWordClass;
 import com.dgtly.system.service.ISysConfigService;
+import com.dgtly.system.service.ISysUserOrderAuthorService;
 import com.dgtly.wxportal.mapper.WxSendMessageMapper;
 import com.dgtly.wxportal.domain.SendOrderNoticeTaskModel;
 import com.dgtly.wxportal.utils.qywxutils.QyWxSendMessageUtil;
@@ -57,6 +59,8 @@ public class WxController extends ApiBaseController {
     @Autowired
     private WxSendMessageMapper wxSendMessageMapper;
 
+    @Autowired
+    private ISysUserOrderAuthorService sysUserOrderAuthorService;
 
     @ApiOperation(value = "获取微信授权跳转url",notes = "参数:{url:www.baidu.com}")
     @ApiImplicitParams({
@@ -475,6 +479,8 @@ public class WxController extends ApiBaseController {
         }
         String pass = EncryptPassWordClass.encryptPassword(user.getLoginName(),password,user.getSalt());
         if(pass.equals(user.getPassword())){
+            List<Ztree>  author = sysUserOrderAuthorService.userAuthorTreeData(user.getUserId());
+            user.setAuthor(author);
             return AjaxResult.success().putKV("sysUser",user);
         }else{
             return AjaxResult.error(301,"密码错误");