Browse Source

Merge branch 'release' of gitadmin/tuoheng_freeway into master

tags/v1.2.0
wanjing 1 year ago
parent
commit
a2217a0b27
3 changed files with 5 additions and 3 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/enums/UserCodeEnum.java
  2. +3
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/IUserServiceImpl.java
  3. +1
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/resources/application-prod.yml

+ 1
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/enums/UserCodeEnum.java View File

@@ -12,7 +12,7 @@ public enum UserCodeEnum {
USER_IS_NULL(1240100, "登录用户为空"),
USER_STATUS_INTERDICT(1240101, "用户状态禁用"),
USER_NAME_IS_NULL(1240102, "登录用户名为空"),
OLD_PASSWORD_IS_NULL(1240103, "原密码为空"),
OLD_PASSWORD_IS_ERROR(1240103, "密码错误"),
PASSWORD_REVISE_FAIL(1240104, "密码修改失败"),
PASSWORD_REVISE_SUCCESS(1240105, "密码修改成功");


+ 3
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/IUserServiceImpl.java View File

@@ -25,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;

/**
@@ -76,6 +77,7 @@ public class IUserServiceImpl extends ServiceImpl<UserMapper, User> implements I
}

@Override
@Transactional(rollbackFor = Exception.class)
public JsonResult resetPwd(ResetPwdDto dto) {
//获取登录用户信息
String username = SecurityUserUtils.username();
@@ -89,7 +91,7 @@ public class IUserServiceImpl extends ServiceImpl<UserMapper, User> implements I
}
//密码校验
if (!user.getPassword().equals(CommonUtils.password(dto.getOldPassword()))) {
return JsonResult.error(UserCodeEnum.OLD_PASSWORD_IS_NULL.getCode(),UserCodeEnum.OLD_PASSWORD_IS_NULL.getMsg());
return JsonResult.error(UserCodeEnum.OLD_PASSWORD_IS_ERROR.getCode(),UserCodeEnum.OLD_PASSWORD_IS_ERROR.getMsg());
}
//设置新密码
user.setPassword(CommonUtils.password(dto.getNewPassword()));

+ 1
- 1
tuoheng-service/tuoheng-miniprogram/src/main/resources/application-prod.yml View File

@@ -66,7 +66,7 @@ aliyuncsVod:
bucketName: ta-tech-image
# 自定义配置
tuoheng:
oidc-url: https://oidc.t-aaron.com
oidc-url: https://oidc-admin.t-aaron.com
# 图片域名
image-url: https://image.t-aaron.com/
# OSS域名

Loading…
Cancel
Save