puzhibing
2023-05-16 4e8951a439c03e87568789cedeb62033884412db
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml
@@ -11,6 +11,8 @@
      <result column="deptid" property="deptid" />
      <result column="tips" property="tips" />
      <result column="version" property="version" />
      <result column="headName" property="headName" />
      <result column="headPhone" property="headPhone" />
   </resultMap>
   <sql id="Base_Column_List">
@@ -20,9 +22,18 @@
   <select id="selectRoles" resultType="map">
      select rr.*,(SELECT COUNT(id) from sys_user where FIND_IN_SET(rr.id,roleid)) as userCount
      from sys_role as rr
      <if test="condition != null">
         where rr.name like CONCAT('%',#{condition},'%')
      </if>
      <where>
         <if test="condition != null and condition != ''">
            and rr.name like CONCAT('%',#{condition},'%')
         </if>
         <if test="headName != null and headName != ''">
            and rr.headName like CONCAT('%',#{headName},'%')
         </if>
         <if test="headPhone != null and headPhone != ''">
            and rr.headPhone like CONCAT('%',#{headPhone},'%')
         </if>
      </where>
      ORDER BY rr.num
   </select>
   <delete id="deleteRolesById">