过滤禁用的用户

This commit is contained in:
huangdeliang 2020-10-09 21:47:05 +08:00
parent 0ce3c1d78e
commit d858c965cd
3 changed files with 12 additions and 12 deletions

View File

@ -149,14 +149,14 @@ public class SysUserController extends BaseController
public AjaxResult edit(@Validated @RequestBody SysUser user) public AjaxResult edit(@Validated @RequestBody SysUser user)
{ {
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) // if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{ // {
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); // return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
} // }
else if (UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) // else if (UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{ // {
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); // return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
} // }
user.setUpdateBy(SecurityUtils.getUsername()); user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUser(user)); return toAjax(userService.updateUser(user));
} }

View File

@ -16,7 +16,7 @@
<sql id="selectCusUserPostVo"> <sql id="selectCusUserPostVo">
SELECT u.user_id, u.nick_name, p.post_id, p.post_code, p.post_name, u.remark SELECT u.user_id, u.nick_name, p.post_id, p.post_code, p.post_name, u.remark
FROM sys_user u, sys_post p, sys_user_post up FROM sys_user u, sys_post p, sys_user_post up
WHERE up.user_id = u.user_id AND p.post_id = up.post_id AND p.post_id > 4 AND u.status = 0 WHERE up.user_id = u.user_id AND p.post_id = up.post_id AND p.remark = 'sale_post' AND u.status = 0
</sql> </sql>
<select id="selectAllCusUserPost" parameterType="CusUserPost" resultMap="CusUserPostResult"> <select id="selectAllCusUserPost" parameterType="CusUserPost" resultMap="CusUserPostResult">

View File

@ -247,9 +247,9 @@
this.getList(); this.getList();
getOptions().then(response => { getOptions().then(response => {
this.options = response.data.reduce((opts, cur) => { this.options = response.data.reduce((opts, cur) => {
if (cur.postCode.startsWith('planner')) { // if (cur.postCode.startsWith('planner')) {
return opts; // return opts;
} // }
if (!opts[cur.postId]) { if (!opts[cur.postId]) {
opts[cur.postId] = []; opts[cur.postId] = [];
} }