| | |
| | | <result property="userType" column="user_type"/> |
| | | <result property="searchscope" column="searchscope"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="campusid" column="campusid"/> |
| | | <association property="dept" column="dept_id" javaType="com.ruoyi.common.core.domain.entity.SysDept" |
| | | resultMap="deptResult"/> |
| | | <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/> |
| | |
| | | u.create_time, |
| | | u.remark, |
| | | u.guid, |
| | | u.orgid, |
| | | u.campusid, |
| | | d.dept_id, |
| | | d.parent_id, |
| | | d.ancestors, |
| | |
| | | u.birthday, |
| | | u.job_phone, |
| | | u.phonenumber, u.sex, u.status, |
| | | u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name from sys_user |
| | | u |
| | | u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, |
| | | u.orgid,u,campusid, |
| | | d.dept_name |
| | | from sys_user u |
| | | left join sys_user_dept d on u.user_id = d.user_id |
| | | where u.del_flag = '0' |
| | | <if test="userId != null"> |
| | |
| | | u.birthday, |
| | | u.job_phone, |
| | | u.phonenumber, u.sex, u.status, |
| | | u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u |
| | | u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, |
| | | u.orgid, u.campusid |
| | | from sys_user u |
| | | where u.del_flag = '0' |
| | | <if test="orgid != null"> |
| | | AND u.orgid = #{orgid} |
| | |
| | | where u.user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> |
| | | <select id="checkUserNameUnique" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select user_id, user_name |
| | | from sys_user |
| | | where user_name = #{userName} |
| | | and del_flag = '0' limit 1 |
| | | and del_flag = '0' |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | limit 1 |
| | | </select> |
| | | |
| | | <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> |
| | |
| | | <if test="hisUserId != null and hisUserId != ''">his_user_id,</if> |
| | | <if test="deptCode != null and deptCode != ''">dept_code,</if> |
| | | <if test="deptName != null and deptName != ''">dept_name,</if> |
| | | <if test="orgid != null and orgid != ''">orgid,</if> |
| | | <if test="campusid != null and campusid != ''">campusid,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | |
| | | <if test="hisUserId != null and hisUserId != ''">#{hisUserId},</if> |
| | | <if test="deptCode != null and deptCode != ''">#{deptCode},</if> |
| | | <if test="deptName != null and deptName != ''">#{deptName},</if> |
| | | <if test="orgid != null and orgid != ''">#{orgid},</if> |
| | | <if test="campusid != null and campusid != ''">#{campusid},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | </if> |
| | | <if test="deptCode != null and deptCode != ''">dept_code=#{deptCode},</if> |
| | | <if test="deptName != null and deptName != ''">dept_name=#{deptName},</if> |
| | | <if test="orgid != null and orgid != ''">orgid=#{orgid},</if> |
| | | <if test="campusid != null and campusid != ''">campusid=#{campusid},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |