| | |
| | | <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 where 1 = 1 |
| | | <if test="condition != null"> |
| | | <if test="condition != null and condition !=''"> |
| | | and rr.name like CONCAT('%',#{condition},'%') |
| | | </if> |
| | | <if test="null != objectId"> |
| | |
| | | ID |
| | | FROM |
| | | sys_role |
| | | WHERE r.objectId = #{objectId} and |
| | | WHERE objectId = #{objectId} and |
| | | ID IN |
| | | |
| | | <foreach collection="array" index="index" item="i" open="(" separator="," close=")"> |
| | | #{i} |
| | | </foreach> |
| | | |
| | | ) r1 ON r.ID = r1.ID where objectId = #{objectId} |
| | | ) r1 ON r.ID = r1.ID where r.objectId = #{objectId} |
| | | ORDER BY |
| | | pId, |
| | | num ASC |