Browse Source

1.账户角色列表查询关联修改

chenw 7 years ago
parent
commit
4182302215

+ 2 - 2
base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -20,8 +20,8 @@
         SELECT a.id id,a.username,a.realname,a.email,a.mobile,GROUP_CONCAT(c.name) roleNames,GROUP_CONCAT(c.id) roleIds
         FROM ac_account a
         left join ac_account_company d on a.id = d.account_id
-        left join ac_account_role b on a.id=b.account_id
-        left join ac_role c  on b.role_id = c.id
+        left join ac_account_role b on a.id=b.account_id and d.company_id = b.company_id
+        left join ac_role c  on b.role_id = c.id and b.company_id = c.company_id
         <where>
             <if test="condition!=null">
                 ${condition}