瀏覽代碼

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

chenw 7 年之前
父節點
當前提交
4182302215
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

+ 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
         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
         FROM ac_account a
         left join ac_account_company d on a.id = d.account_id
         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>
         <where>
             <if test="condition!=null">
             <if test="condition!=null">
                 ${condition}
                 ${condition}