wangliang 4 years ago
parent
commit
0f5b8da8d4

+ 9 - 0
themis-business/src/main/java/com/qmth/themis/business/dto/response/TBUserDto.java

@@ -20,12 +20,21 @@ public class TBUserDto implements Serializable {
     private String updateName;//更新人
     private Date updateTime;//更新时间
     private String loginName;//登录名
+    private Long orgId;//机构id
     private String orgName;//机构名称
     private String mobileNumber;//手机号
     private String roleCodeStr;//角色编码
     private List<String> roleCode;
     private List<String> roleName;
 
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
     public String getMobileNumber() {
         return mobileNumber;
     }

+ 3 - 2
themis-business/src/main/resources/mapper/TBUserMapper.xml

@@ -7,6 +7,7 @@
             t.id,
             t.name,
             t.loginName,
+            t.orgId,
             t.orgName,
             t.roleNameStr,
             t.enable,
@@ -17,7 +18,7 @@
             from
             (
             select
-            tbu.id, tbu.mobile_number as mobileNumber, tbu.login_name as loginName, tbu.name, group_concat(tbr.role_code) as roleCodeStr, group_concat(tbr.role_name) as roleNameStr, tbu.enable,(
+                tbu.org_id as orgId,tbu.id, tbu.mobile_number as mobileNumber, tbu.login_name as loginName, tbu.name, group_concat(tbr.role_code) as roleCodeStr, group_concat(tbr.role_name) as roleNameStr, tbu.enable,(
             select
             t.name
             from
@@ -55,7 +56,7 @@
                 <if test="enable != null and enable != '' or enable == 0">
                     and tbu.enable = #{enable}
                 </if>
-            </where> group by tbu.id,tbu.mobile_number,tbu.login_name,tbu.name,tbu.enable) t
+            </where> group by tbu.org_id,tbu.id,tbu.mobile_number,tbu.login_name,tbu.name,tbu.enable) t
             <where>
                 <if test="role != null and role != ''">
                     and t.roleCodeStr like concat('%', #{role}, '%')