mirror of https://gitee.com/stylefeng/roses
【7.0.4】【c】更新激活用户失败提示
parent
4bc438d15c
commit
9ce08f494f
|
@ -71,7 +71,12 @@ public enum CustomerExceptionEnum implements AbstractExceptionEnum {
|
||||||
/**
|
/**
|
||||||
* 注册时,发送邮件失败,请联系管理员
|
* 注册时,发送邮件失败,请联系管理员
|
||||||
*/
|
*/
|
||||||
EMAIL_SEND_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + CustomerConstants.CUSTOMER_EXCEPTION_STEP_CODE + "07", "注册失败,网络异常!请联系管理员!");
|
EMAIL_SEND_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + CustomerConstants.CUSTOMER_EXCEPTION_STEP_CODE + "07", "注册失败,网络异常!请联系管理员!"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 激活用户失败
|
||||||
|
*/
|
||||||
|
ACTIVE_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + CustomerConstants.CUSTOMER_EXCEPTION_STEP_CODE + "07", "激活用户失败!用户激活码无效!");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 错误编码
|
* 错误编码
|
||||||
|
|
|
@ -111,12 +111,14 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void active(CustomerRequest customerRequest) {
|
public void active(CustomerRequest customerRequest) {
|
||||||
|
|
||||||
// 更新验证码的账号为激活状态
|
// 更新验证码的账号为激活状态
|
||||||
LambdaUpdateWrapper<Customer> wrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<Customer> wrapper = new LambdaUpdateWrapper<>();
|
||||||
wrapper.set(Customer::getVerifiedFlag, YesOrNotEnum.Y.getCode());
|
wrapper.set(Customer::getVerifiedFlag, YesOrNotEnum.Y.getCode());
|
||||||
wrapper.eq(Customer::getVerifyCode, customerRequest.getVerifyCode());
|
wrapper.eq(Customer::getVerifyCode, customerRequest.getVerifyCode());
|
||||||
this.update(wrapper);
|
boolean result = this.update(wrapper);
|
||||||
|
if(!result){
|
||||||
|
throw new CustomerException(CustomerExceptionEnum.ACTIVE_ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue