| | |
| | | <select id="selectIdByPhone" resultType="java.lang.Long"> |
| | | select user_id from sys_user where phonenumber = #{phonenumber} and status = 0 and del_flag = 0 |
| | | </select> |
| | | <select id="listByRole" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId |
| | | from sys_user u |
| | | WHERE u.del_flag = 0 |
| | | <if test="userIds != null and userIds.size()>0"> |
| | | AND u.user_id IN |
| | | <foreach collection="userIds" close=")" open="(" item="userId" separator=","> |
| | | #{userId} |
| | | </foreach> |
| | | </if> |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND u.nick_name LIKE concat('%',#{nickName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> |
| | | insert into sys_user( |
| | |
| | | <if test="disableRemark != null">disable_remark = #{disableRemark},</if> |
| | | <if test="operatingTime != null">operating_time = #{operatingTime},</if> |
| | | <if test="operatingPerson != null">operating_person = #{operatingPerson},</if> |
| | | <if test="roleType != null">role_type = #{roleType},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |