[fix]修改提现逻辑
This commit is contained in:
parent
0966105bc5
commit
a288e3ec5c
@ -120,7 +120,6 @@ security:
|
||||
- /*/api-docs
|
||||
- /*/api-docs/**
|
||||
- /warm-flow-ui/token-name
|
||||
- /app/**
|
||||
- /resource/oss/**
|
||||
- /callback/api
|
||||
- /cms/vlog/vodCallBack
|
||||
|
@ -46,7 +46,7 @@ public class SaTokenExceptionHandler {
|
||||
public R<Void> handleNotLoginException(NotLoginException e, HttpServletRequest request) {
|
||||
String requestURI = request.getRequestURI();
|
||||
log.error("请求地址'{}',认证失败'{}',无法访问系统资源", requestURI, e.getMessage());
|
||||
return R.fail(HttpStatus.HTTP_UNAUTHORIZED, "认证失败,无法访问系统资源:" + e.getMessage());
|
||||
return R.notLogin();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -75,13 +75,6 @@ public class SecurityConfig implements WebMvcConfigurer {
|
||||
// "-100", "客户端ID与Token不匹配",
|
||||
// StpUtil.getTokenValue());
|
||||
// }
|
||||
|
||||
// 有效率影响 用于临时测试
|
||||
// if (log.isDebugEnabled()) {
|
||||
// log.info("剩余有效时间: {}", StpUtil.getTokenTimeout());
|
||||
// log.info("临时有效时间: {}", StpUtil.getTokenActivityTimeout());
|
||||
// }
|
||||
|
||||
});
|
||||
})).addPathPatterns("/**")
|
||||
// 排除不需要拦截的路径
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.dromara.common.web.handler;
|
||||
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import jakarta.servlet.ServletException;
|
||||
@ -180,4 +181,13 @@ public class GlobalExceptionHandler {
|
||||
return R.fail(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义验证异常
|
||||
*/
|
||||
@ExceptionHandler(NotLoginException.class)
|
||||
public R<Void> handleNotLoginException(NotLoginException e) {
|
||||
log.error(e.getMessage());
|
||||
return R.notLogin();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.wzj.soopin.member.convert.impl;
|
||||
|
||||
import com.wzj.soopin.member.domain.po.AccountBill;
|
||||
import com.wzj.soopin.member.domain.vo.AccountBillVO;
|
||||
import com.wzj.soopin.member.enums.AccountBillSourceEnum;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 会员账户表 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Component("accountBillConvert")
|
||||
@Primary
|
||||
public class AccountBillConvertImpl extends com.wzj.soopin.member.convert.AccountBillConvertImpl {
|
||||
@Override
|
||||
public AccountBillVO toVO(AccountBill t) {
|
||||
AccountBillVO vo= super.toVO(t);
|
||||
vo.setSourceName(AccountBillSourceEnum.getByCode(t.getSource()).getMessage());
|
||||
return vo;
|
||||
}
|
||||
}
|
@ -54,6 +54,10 @@ public class AccountBillVO extends BaseAudit {
|
||||
@Excel(name = "来源")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description ="来源")
|
||||
@Excel(name = "来源")
|
||||
private String sourceName;
|
||||
|
||||
@Schema(description ="会员id")
|
||||
private Long memberId;
|
||||
|
||||
|
@ -25,6 +25,14 @@ public enum AccountBillSourceEnum {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
public static AccountBillSourceEnum getByCode(Integer code) {
|
||||
for (AccountBillSourceEnum anEnum : AccountBillSourceEnum.values()) {
|
||||
if (anEnum.getCode().equals(code)) {
|
||||
return anEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
|
Loading…
x
Reference in New Issue
Block a user