mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 10:18:42 +08:00 
			
		
		
		
	完成支付回调的逻辑
This commit is contained in:
		| @@ -6,7 +6,7 @@ import cn.hutool.extra.servlet.ServletUtil; | ||||
| import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | ||||
| import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkService; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateReqDTO; | ||||
| import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; | ||||
| import cn.iocoder.yudao.framework.web.config.WebProperties; | ||||
| import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; | ||||
| @@ -68,7 +68,7 @@ public class ApiAccessLogFilter extends OncePerRequestFilter { | ||||
|  | ||||
|     private void createApiAccessLog(HttpServletRequest request, Date beginTime, | ||||
|                                     Map<String, String> queryString, String requestBody, Exception ex) { | ||||
|         ApiAccessLogCreateDTO accessLog = new ApiAccessLogCreateDTO(); | ||||
|         ApiAccessLogCreateReqDTO accessLog = new ApiAccessLogCreateReqDTO(); | ||||
|         try { | ||||
|             this.buildApiAccessLogDTO(accessLog, request, beginTime, queryString, requestBody, ex); | ||||
|             apiAccessLogFrameworkService.createApiAccessLogAsync(accessLog); | ||||
| @@ -77,7 +77,7 @@ public class ApiAccessLogFilter extends OncePerRequestFilter { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private void buildApiAccessLogDTO(ApiAccessLogCreateDTO accessLog, HttpServletRequest request, Date beginTime, | ||||
|     private void buildApiAccessLogDTO(ApiAccessLogCreateReqDTO accessLog, HttpServletRequest request, Date beginTime, | ||||
|                                       Map<String, String> queryString, String requestBody, Exception ex) { | ||||
|         // 处理用户信息 | ||||
|         accessLog.setUserId(WebFrameworkUtils.getLoginUserId(request)); | ||||
|   | ||||
| @@ -1,9 +1,8 @@ | ||||
| package cn.iocoder.yudao.framework.apilog.core.service; | ||||
|  | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateDTO; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiAccessLogCreateReqDTO; | ||||
|  | ||||
| import javax.validation.Valid; | ||||
| import java.util.concurrent.Future; | ||||
|  | ||||
| /** | ||||
|  * API 访问日志 Framework Service 接口 | ||||
| @@ -17,6 +16,6 @@ public interface ApiAccessLogFrameworkService { | ||||
|      * | ||||
|      * @param createDTO 创建信息 | ||||
|      */ | ||||
|     void createApiAccessLogAsync(@Valid ApiAccessLogCreateDTO createDTO); | ||||
|     void createApiAccessLogAsync(@Valid ApiAccessLogCreateReqDTO createDTO); | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -1,9 +1,8 @@ | ||||
| package cn.iocoder.yudao.framework.apilog.core.service; | ||||
|  | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateReqDTO; | ||||
|  | ||||
| import javax.validation.Valid; | ||||
| import java.util.concurrent.Future; | ||||
|  | ||||
| /** | ||||
|  * API 错误日志 Framework Service 接口 | ||||
| @@ -17,6 +16,6 @@ public interface ApiErrorLogFrameworkService { | ||||
|      * | ||||
|      * @param createDTO 创建信息 | ||||
|      */ | ||||
|     void createApiErrorLogAsync(@Valid ApiErrorLogCreateDTO createDTO); | ||||
|     void createApiErrorLogAsync(@Valid ApiErrorLogCreateReqDTO createDTO); | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -11,7 +11,7 @@ import java.util.Date; | ||||
|  * @author 芋道源码 | ||||
|  */ | ||||
| @Data | ||||
| public class ApiAccessLogCreateDTO { | ||||
| public class ApiAccessLogCreateReqDTO { | ||||
| 
 | ||||
|     /** | ||||
|      * 链路追踪编号 | ||||
| @@ -13,7 +13,7 @@ import java.util.Date; | ||||
|  */ | ||||
| @Data | ||||
| @Accessors(chain = true) | ||||
| public class ApiErrorLogCreateDTO { | ||||
| public class ApiErrorLogCreateReqDTO { | ||||
| 
 | ||||
|     /** | ||||
|      * 链路编号 | ||||
| @@ -6,7 +6,7 @@ import cn.hutool.extra.servlet.ServletUtil; | ||||
| import cn.iocoder.yudao.framework.common.exception.ServiceException; | ||||
| import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateDTO; | ||||
| import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateReqDTO; | ||||
| import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; | ||||
| import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; | ||||
| import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | ||||
| @@ -15,7 +15,6 @@ import io.github.resilience4j.ratelimiter.RequestNotPermitted; | ||||
| import lombok.AllArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.apache.commons.lang3.exception.ExceptionUtils; | ||||
| import org.springframework.beans.factory.annotation.Value; | ||||
| import org.springframework.security.access.AccessDeniedException; | ||||
| import org.springframework.util.Assert; | ||||
| import org.springframework.validation.BindException; | ||||
| @@ -28,7 +27,6 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; | ||||
| import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; | ||||
| import org.springframework.web.servlet.NoHandlerFoundException; | ||||
|  | ||||
| import javax.annotation.Resource; | ||||
| import javax.servlet.http.HttpServletRequest; | ||||
| import javax.validation.ConstraintViolation; | ||||
| import javax.validation.ConstraintViolationException; | ||||
| @@ -231,7 +229,7 @@ public class GlobalExceptionHandler { | ||||
|  | ||||
|     private void createExceptionLog(HttpServletRequest req, Throwable e) { | ||||
|         // 插入错误日志 | ||||
|         ApiErrorLogCreateDTO errorLog = new ApiErrorLogCreateDTO(); | ||||
|         ApiErrorLogCreateReqDTO errorLog = new ApiErrorLogCreateReqDTO(); | ||||
|         try { | ||||
|             // 初始化 errorLog | ||||
|             initExceptionLog(errorLog, req, e); | ||||
| @@ -242,7 +240,7 @@ public class GlobalExceptionHandler { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private void initExceptionLog(ApiErrorLogCreateDTO errorLog, HttpServletRequest request, Throwable e) { | ||||
|     private void initExceptionLog(ApiErrorLogCreateReqDTO errorLog, HttpServletRequest request, Throwable e) { | ||||
|         // 处理用户信息 | ||||
|         errorLog.setUserId(WebFrameworkUtils.getLoginUserId(request)); | ||||
|         errorLog.setUserType(WebFrameworkUtils.getLoginUserType(request)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV