Commit 1fbb12a6 authored by gaoyingwei's avatar gaoyingwei

新增 注销用户身份,清空openID

parent fa035bed
...@@ -349,4 +349,12 @@ public class SysUserController extends CyPaginationController<SysUser> { ...@@ -349,4 +349,12 @@ public class SysUserController extends CyPaginationController<SysUser> {
data); data);
} }
//图形验证码
@GetMapping({"/unregister"})
public CyResult unregister(Integer userId) {
return CyResultGenUtil.builder(sysUserServiceImpl.unregister(userId),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
userId);
}
} }
...@@ -91,5 +91,7 @@ public interface SysUserRepositorys extends CyBaseMapper<SysUser> { ...@@ -91,5 +91,7 @@ public interface SysUserRepositorys extends CyBaseMapper<SysUser> {
//微信根据pin查询用户 //微信根据pin查询用户
int selectByPin(@Param("pin") String pin,@Param("businessId") Integer businessId); int selectByPin(@Param("pin") String pin,@Param("businessId") Integer businessId);
int delWxOpenId(@Param("userId") Integer userId);
} }
...@@ -129,4 +129,6 @@ public interface SysUserService { ...@@ -129,4 +129,6 @@ public interface SysUserService {
* @return * @return
*/ */
public SysUser getUserByPersonId(String personId); public SysUser getUserByPersonId(String personId);
CyPersistModel unregister(Integer userId);
} }
...@@ -926,6 +926,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser> ...@@ -926,6 +926,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserRepositorys, SysUser>
return sysUserRepositorys.querySysUserByPersonId(personId); return sysUserRepositorys.querySysUserByPersonId(personId);
} }
@Override
public CyPersistModel unregister(Integer userId) {
sysUserRepositorys.delWxOpenId(userId);
return new CyPersistModel(1);
}
/** /**
* 去除List中空数据 * 去除List中空数据
* *
......
...@@ -606,4 +606,10 @@ ...@@ -606,4 +606,10 @@
</if> </if>
and del_flag = 0 and del_flag = 0
</select> </select>
<update id="delWxOpenId" parameterType="Integer">
update sys_user
set wx_openid = null
where business_id = #{userId}
</update>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment