|
@@ -68,7 +68,7 @@
|
|
|
gender_ as gender
|
|
|
FROM employee t
|
|
|
left join sys_user u on t.user_id_ = u.id_
|
|
|
- where t.user_id_ = #{id}
|
|
|
+ where u.del_flag_ = 0 and t.user_id_ = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.EmployeeVo">
|
|
@@ -81,6 +81,7 @@
|
|
|
FROM employee t
|
|
|
left join sys_user u on t.user_id_ = u.id_
|
|
|
<where>
|
|
|
+ u.del_flag_ = 0
|
|
|
<if test="null != param.search and '' != param.search">
|
|
|
AND (
|
|
|
t.user_id_ LIKE CONCAT('%', #{param.search}, '%') or
|
|
@@ -115,9 +116,6 @@
|
|
|
<update id="updateSysUser" parameterType="com.yonge.cooleshow.auth.api.entity.SysUser">
|
|
|
UPDATE sys_user
|
|
|
<set>
|
|
|
- <if test="delFlag != null">
|
|
|
- del_flag_ = #{delFlag},
|
|
|
- </if>
|
|
|
<if test="wxOpenid != null and wxOpenid != ''">
|
|
|
wx_openid_ = #{wxOpenid},
|
|
|
</if>
|
|
@@ -179,7 +177,7 @@
|
|
|
certificate_type_ = #{certificateType},
|
|
|
</if>
|
|
|
</set>
|
|
|
- WHERE id_ = #{id}
|
|
|
+ WHERE del_flag_ = 0 and id_ = #{id}
|
|
|
</update>
|
|
|
|
|
|
<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.Employee" useGeneratedKeys="true" keyColumn="id"
|
|
@@ -251,15 +249,15 @@
|
|
|
</insert>
|
|
|
|
|
|
<select id="querySysUserByPhoneAndLock" resultMap="SysUser">
|
|
|
- select * from sys_user where phone_ = #{phone} OR username_ = #{phone} LIMIT 1 FOR UPDATE
|
|
|
+ select * from sys_user where del_flag_ = 0 and (phone_ = #{phone} OR username_ = #{phone}) LIMIT 1 FOR UPDATE
|
|
|
</select>
|
|
|
|
|
|
<select id="querySysUserByPhone" resultMap="SysUser">
|
|
|
- select * from sys_user where phone_ = #{phone} OR username_ = #{phone}
|
|
|
+ select * from sys_user where del_flag_ = 0 and (phone_ = #{phone} OR username_ = #{phone})
|
|
|
</select>
|
|
|
|
|
|
<select id="querySysUserById" resultMap="SysUser">
|
|
|
- select * from sys_user where id_ = #{id}
|
|
|
+ select * from sys_user where del_flag_ = 0 and id_ = #{id}
|
|
|
</select>
|
|
|
|
|
|
<update id="updateUserDemissionDate">
|
|
@@ -294,7 +292,7 @@
|
|
|
</insert>
|
|
|
|
|
|
<update id="updatePasswordReq">
|
|
|
- UPDATE sys_user SET password_ = #{password} WHERE id_ = #{userID}
|
|
|
+ UPDATE sys_user SET password_ = #{password} WHERE del_flag_ = 0 and id_ = #{userID}
|
|
|
</update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
@@ -311,7 +309,7 @@
|
|
|
|
|
|
|
|
|
<select id="getUsers" resultMap="SysUser">
|
|
|
- select * from sys_user where id_ IN
|
|
|
+ select * from sys_user where del_flag_ = 0 and id_ IN
|
|
|
<foreach collection="userIds" open="(" close=")" separator="," item="userId">
|
|
|
#{userId}
|
|
|
</foreach>
|