| | |
| | | <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> |
| | | select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | <select id="pageList" resultType="com.sinata.system.domain.vo.SysUserVO"> |
| | | SELECT su.USER_ID,su.NICK_NAME, |
| | | su.USER_NAME, |
| | | su.STATUS, |
| | | sd.DEPARTMENT_NAME, |
| | | sr.ROLE_NAME |
| | | FROM SYS_USER su |
| | | LEFT JOIN SYS_DEPARTMENT sd |
| | | ON su.DEPARTMENT_ID = sd.ID |
| | | LEFT JOIN SYS_USER_ROLE sur |
| | | ON sur.USER_ID = su.USER_ID |
| | | LEFT JOIN SYS_ROLE sr |
| | | ON sr.ROLE_ID = sur.ROLE_ID |
| | | <where> |
| | | <if test="departmentId != null and departmentId != ''">] |
| | | sud.DEPARTMENT_ID = #{departmentId} |
| | | </if> |
| | | <if test="nickName != null and nickName != ''">] |
| | | su.NICK_NAME LIKE CONCAT('%',#{nickName},'%') |
| | | </if> |
| | | <if test="roleId != null and roleId != ''">] |
| | | sur.ROLE_ID = #{roleId} |
| | | </if> |
| | | <if test="treeCode != null and treeCode != ''"> |
| | | sd.TREE_CODE LIKE CONCAT(#{treeCode},'%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> |
| | | insert into sys_user( |
| | | <if test="userId != null and userId != 0">user_id,</if> |