1.添加头像上传接口

This commit is contained in:
2025-08-07 15:41:10 +08:00
parent 51b9180316
commit ff29da493e
2 changed files with 5 additions and 1 deletions

View File

@@ -169,6 +169,9 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserModel> implements
if (userModel == null) {
throw new BusinessException(ErrorCode.USER_DOES_NOT_EXIST);
}
if (userModel.getStatus() == 0){
throw new BusinessException(ErrorCode.USER_HAS_ACTIVATED);
}
userModel.setStatus(0);
userModel.setMailVerification(0);
if (userDao.updateById(userModel) == 1){

View File

@@ -33,7 +33,8 @@ public enum ErrorCode {
USER_DOES_NOT_EXIST(5002,"用户不存在"),
MAIL_ALREADY_EXIST(5003,"邮箱已存在"),
PASSWORD_ERROR(5004, "用户名或密码错误" ),
TOKEN_INVALID(40400, "Token无效请重新登录");
TOKEN_INVALID(40400, "Token无效请重新登录"),
USER_HAS_ACTIVATED(5005,"用户已激活" );
/**
* 状态码