更新了写真预约特殊产品处理
This commit is contained in:
parent
c6d5d2f92c
commit
cf4b1098ee
|
@ -27,6 +27,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.util.DigestUtils;
|
import org.springframework.util.DigestUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -53,6 +54,10 @@ public class UserController {
|
||||||
private WxOpenConfig wxOpenConfig;
|
private WxOpenConfig wxOpenConfig;
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RedisTemplate redisTemplate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户登录
|
* 用户登录
|
||||||
* @param userLoginRequest 用户登录请求体
|
* @param userLoginRequest 用户登录请求体
|
||||||
|
|
|
@ -83,7 +83,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validUser(User user, boolean update) {
|
public void validUser(User user, boolean update) {
|
||||||
String userAccount = user.getUserAccount();
|
|
||||||
String userPassword = user.getUserPassword();
|
String userPassword = user.getUserPassword();
|
||||||
String userName = user.getUserName();
|
String userName = user.getUserName();
|
||||||
String userAvatar = user.getUserAvatar();
|
String userAvatar = user.getUserAvatar();
|
||||||
|
@ -91,7 +90,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||||
String userRole = user.getUserRole();
|
String userRole = user.getUserRole();
|
||||||
Long id = user.getId();
|
Long id = user.getId();
|
||||||
ThrowUtils.throwIf(update && id == null, ErrorCode.OPERATION_ERROR, "id字段为null");
|
ThrowUtils.throwIf(update && id == null, ErrorCode.OPERATION_ERROR, "id字段为null");
|
||||||
if (StringUtils.isAnyBlank(userAccount, userPassword, userName, userAvatar, phone, userRole)) {
|
if (StringUtils.isAnyBlank(userPassword, userName, userAvatar, phone, userRole)) {
|
||||||
throw new BusinessException(ErrorCode.PARAMS_ERROR, "存在参数为空");
|
throw new BusinessException(ErrorCode.PARAMS_ERROR, "存在参数为空");
|
||||||
}
|
}
|
||||||
ThrowUtils.throwIf(!RegexUtils.isPhoneInvalid(phone), ErrorCode.OPERATION_ERROR, "手机号格式错误");
|
ThrowUtils.throwIf(!RegexUtils.isPhoneInvalid(phone), ErrorCode.OPERATION_ERROR, "手机号格式错误");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user