| | |
| | | <result column="depart_update_time" property="updateTime"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </association> |
| | | <collection property="roles" javaType="ArrayList" ofType="com.ycl.entity.user.UmsRole"> |
| | | <id column="role_id" property="id" /> |
| | | <result column="name" property="name" /> |
| | | <result column="description" property="description" /> |
| | | <result column="admin_count" property="adminCount" /> |
| | | <result column="role_create_time" property="createTime" /> |
| | | <result column="role_status" property="status" /> |
| | | <result column="sort" property="sort" /> |
| | | <collection property="roles" javaType="ArrayList" ofType="com.ycl.entity.user.UmsRole" column="id" select="selectAdminRoles"> |
| | | <id column="role_id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="description" property="description"/> |
| | | <result column="admin_count" property="adminCount"/> |
| | | <result column="role_create_time" property="createTime"/> |
| | | <result column="role_status" property="status"/> |
| | | <result column="sort" property="sort"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | |
| | | |
| | | <select id="selectCondPage" parameterType="com.ycl.entity.user.UmsAdmin" resultMap="CondMapResultMap"> |
| | | SELECT |
| | | ua.*, |
| | | ud.id depart_id, |
| | | ud.depart_name, |
| | | ud.depart_des, |
| | | ud.depart_type, |
| | | ud.parent_id, |
| | | ud.create_time depat_create_time, |
| | | ud.update_time depat_update_time, |
| | | ud.STATUS depart_status, |
| | | ud.is_deleted, |
| | | ur.id role_id, |
| | | ur.name NAME, |
| | | ur.description, |
| | | ur.admin_count, |
| | | ur.create_time role_create_time, |
| | | ur.STATUS role_status, |
| | | ur.sort |
| | | ua.*, |
| | | ud.id depart_id, |
| | | ud.depart_name, |
| | | ud.depart_des, |
| | | ud.depart_type, |
| | | ud.parent_id, |
| | | ud.create_time depat_create_time, |
| | | ud.update_time depat_update_time, |
| | | ud.STATUS depart_status, |
| | | ud.is_deleted |
| | | FROM |
| | | ums_admin ua |
| | | LEFT JOIN ums_depart_manager udm ON ua.id = udm.user_id |
| | | LEFT JOIN ums_depart ud ON udm.depart_id = ud.id |
| | | LEFT JOIN ums_admin_role_relation uarr ON ua.id = uarr.admin_id |
| | | LEFT JOIN ums_role ur ON uarr.role_id = ur.id |
| | | ums_admin ua |
| | | LEFT JOIN ums_depart_manager udm ON ua.id = udm.user_id |
| | | LEFT JOIN ums_depart ud ON udm.depart_id = ud.id |
| | | <where> |
| | | <if test="umsAdmin.keyword !=null and umsAdmin.keyword !=''"> |
| | | AND (ua.username LIKE concat('%',#{umsAdmin.keyword,jdbcType=VARCHAR},'%') |
| | |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | ua.id DESC |
| | | ua.id DESC |
| | | </select> |
| | | |
| | | <select id="selectAdminRoles" parameterType="java.lang.Long" resultType="com.ycl.entity.user.UmsRole"> |
| | | select ur.id role_id, |
| | | ur.name NAME, |
| | | ur.description, |
| | | ur.admin_count, |
| | | ur.create_time role_create_time, |
| | | ur.STATUS role_status, |
| | | ur.sort |
| | | from ums_admin ua |
| | | LEFT JOIN ums_admin_role_relation uarr ON ua.id = uarr.admin_id |
| | | left join ums_role ur on uarr.role_id = ur.id |
| | | where ua.id = #{id} |
| | | </select> |
| | | </mapper> |