👎 增加所有租户商城的自动取消订单和自动确认收货
This commit is contained in:
+7
-7
@@ -19,40 +19,40 @@ import lombok.EqualsAndHashCode;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class YshopException extends RuntimeException{
|
||||
public class ShopException extends RuntimeException{
|
||||
|
||||
private static final long serialVersionUID = -2470461654663264392L;
|
||||
|
||||
private Integer errorCode;
|
||||
private String message;
|
||||
|
||||
public YshopException() {
|
||||
public ShopException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public YshopException(String message) {
|
||||
public ShopException(String message) {
|
||||
super(message);
|
||||
this.errorCode = ApiCode.FAIL.getCode();
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public YshopException(Integer errorCode, String message) {
|
||||
public ShopException(Integer errorCode, String message) {
|
||||
super(message);
|
||||
this.errorCode = errorCode;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public YshopException(ApiCode apiCode) {
|
||||
public ShopException(ApiCode apiCode) {
|
||||
super(apiCode.getMessage());
|
||||
this.errorCode = apiCode.getCode();
|
||||
this.message = apiCode.getMessage();
|
||||
}
|
||||
|
||||
public YshopException(String message, Throwable cause) {
|
||||
public ShopException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public YshopException(Throwable cause) {
|
||||
public ShopException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@ import cn.hutool.extra.servlet.ServletUtil;
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService;
|
||||
import cn.iocoder.yudao.framework.apilog.core.service.dto.ApiErrorLogCreateReqDTO;
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.exception.YshopException;
|
||||
import cn.iocoder.yudao.framework.common.exception.ShopException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.ApiResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||
@@ -223,8 +223,8 @@ public class GlobalExceptionHandler {
|
||||
return CommonResult.error(ex.getCode(), ex.getMessage());
|
||||
}
|
||||
|
||||
@ExceptionHandler(value = YshopException.class)
|
||||
public ApiResult<?> yshopException(YshopException ex){
|
||||
@ExceptionHandler(value = ShopException.class)
|
||||
public ApiResult<?> yshopException(ShopException ex){
|
||||
log.info("[YshopException]",ex);
|
||||
return ApiResult.fail(ex.getErrorCode(),ex.getMessage());
|
||||
//return CommonResult.error(ex.getErrorCode(), ex.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user