Browse Source

防重复提交调整

feature-1.1
wuxicheng 3 years ago
parent
commit
a13cce8449
  1. 2
      bnyer-common/bnyer-common-core/src/main/java/com/bnyer/common/core/domain/R.java
  2. 2
      bnyer-services/bnyer-order/src/main/java/com/bnyer/order/aop/LimitRepeatRequestAspect.java
  3. 2
      bnyer-services/bnyer-pay/src/main/java/com/bnyer/pay/aop/LimitRepeatRequestAspect.java

2
bnyer-common/bnyer-common-core/src/main/java/com/bnyer/common/core/domain/R.java

@ -83,7 +83,7 @@ public class R<T> implements Serializable
* @return * @return
*/ */
public R<T> buildRepeatRequest(int time){ public R<T> buildRepeatRequest(int time){
return restResult(null,ResponseEnum.REPEAT_REQUEST_ERROR.getCode(),time+"分钟内"+ResponseEnum.REPEAT_REQUEST_ERROR.getMsg()); return restResult(null,ResponseEnum.REPEAT_REQUEST_ERROR.getCode(),time+"内"+ResponseEnum.REPEAT_REQUEST_ERROR.getMsg());
} }
private static <T> R<T> restResult(T data, int code, String msg) private static <T> R<T> restResult(T data, int code, String msg)

2
bnyer-services/bnyer-order/src/main/java/com/bnyer/order/aop/LimitRepeatRequestAspect.java

@ -48,7 +48,7 @@ public class LimitRepeatRequestAspect {
if (StringUtils.isNotBlank(limitRepeatRequest.message())){ if (StringUtils.isNotBlank(limitRepeatRequest.message())){
throw new ServiceException(limitRepeatRequest.message(),ResponseEnum.REPEAT_REQUEST_ERROR.getCode()); throw new ServiceException(limitRepeatRequest.message(),ResponseEnum.REPEAT_REQUEST_ERROR.getCode());
}else { }else {
throw new ServiceException(limitRepeatRequest.time()+"分钟内"+ResponseEnum.REPEAT_REQUEST_ERROR.getMsg(), throw new ServiceException(limitRepeatRequest.time()+"内"+ResponseEnum.REPEAT_REQUEST_ERROR.getMsg(),
ResponseEnum.REPEAT_REQUEST_ERROR.getCode()); ResponseEnum.REPEAT_REQUEST_ERROR.getCode());
} }
} }

2
bnyer-services/bnyer-pay/src/main/java/com/bnyer/pay/aop/LimitRepeatRequestAspect.java

@ -48,7 +48,7 @@ public class LimitRepeatRequestAspect {
if (StringUtils.isNotBlank(limitRepeatRequest.message())){ if (StringUtils.isNotBlank(limitRepeatRequest.message())){
throw new ServiceException(limitRepeatRequest.message(),ResponseEnum.REPEAT_REQUEST_ERROR.getCode()); throw new ServiceException(limitRepeatRequest.message(),ResponseEnum.REPEAT_REQUEST_ERROR.getCode());
}else { }else {
throw new ServiceException(limitRepeatRequest.time()+"分钟内"+ResponseEnum.REPEAT_REQUEST_ERROR.getMsg(), throw new ServiceException(limitRepeatRequest.time()+"内"+ResponseEnum.REPEAT_REQUEST_ERROR.getMsg(),
ResponseEnum.REPEAT_REQUEST_ERROR.getCode()); ResponseEnum.REPEAT_REQUEST_ERROR.getCode());
} }
} }

Loading…
Cancel
Save