Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.dev33.satoken.exception.NotLoginException;
|
||||
import cn.dev33.satoken.exception.NotPermissionException;
|
||||
import cn.dev33.satoken.exception.NotRoleException;
|
||||
import cn.hutool.core.exceptions.ValidateException;
|
||||
import cn.hutool.core.io.resource.NoResourceException;
|
||||
import com.czg.resp.CzgRespCode;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
|
||||
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.resource.NoResourceFoundException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -37,6 +39,14 @@ public class CzgControllerAdvice {
|
||||
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), ex.getMessage());
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ExceptionHandler(value = NoResourceFoundException.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public CzgResult<Object> errorHandler(NoResourceFoundException ex) {
|
||||
log.error("资源不存在");
|
||||
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), ex.getMessage());
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ExceptionHandler(value = NotLoginException.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
@@ -201,4 +201,8 @@ public class OrderDetail implements Serializable {
|
||||
public String getRefundRemark() {
|
||||
return StrUtil.isBlank(refundRemark) ? "" : refundRemark + " ";
|
||||
}
|
||||
|
||||
public BigDecimal getCouponNum() {
|
||||
return couponNum == null ? BigDecimal.ZERO : couponNum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.czg.order.entity.OrderInfo;
|
||||
import com.czg.order.enums.PayEnums;
|
||||
import com.czg.order.vo.HistoryOrderVo;
|
||||
import com.czg.order.vo.OrderInfoVo;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@@ -30,6 +31,8 @@ public interface OrderInfoService extends IService<OrderInfo> {
|
||||
|
||||
Page<OrderInfoVo> getOrderByPage(OrderInfoQueryDTO param);
|
||||
|
||||
CzgResult<HistoryOrderVo> getOrderDetails(Long orderId);
|
||||
|
||||
HistoryOrderVo historyOrder(Long orderId, String tableCode);
|
||||
|
||||
OrderInfo createOrder(OrderInfoAddDTO param);
|
||||
|
||||
Reference in New Issue
Block a user