| @@ -401,5 +401,38 @@ public class WxOrderController extends BaseController { | |||||
| } | } | ||||
| } | } | ||||
| @ApiOperation("购物车订单详情接口") | |||||
| @GetMapping("goodsDetail") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "String", paramType = "query", required = true) | |||||
| }) | |||||
| public ResultData goodsDetail(String mainOrderId) { | |||||
| if (StringUtils.isBlank(mainOrderId) || mainOrderId.equalsIgnoreCase(Constant.UNDEFINED)) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| // c端用户应该只能看到自己的订单细节 | |||||
| WxOrder wxOrder = new WxOrder(); | |||||
| Long composeOrderId = 0L; | |||||
| try { | |||||
| composeOrderId = Long.valueOf(mainOrderId); | |||||
| } catch (NumberFormatException e) { | |||||
| logger.error("parse composeOrderId failed"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "订单ID转换异常:"+mainOrderId); | |||||
| } | |||||
| wxOrder.setComposeOrderId(composeOrderId); | |||||
| Long memberId; | |||||
| try { | |||||
| memberId = getMemberId(); | |||||
| } catch (Exception e) { | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | |||||
| } | |||||
| wxOrder.setCUserId(memberId); | |||||
| List<WxOrderCouponVo> wxOrders = wxOrderService.goodsDetailCUserVo(wxOrder); | |||||
| if (wxOrders == null) | |||||
| return new ResultData(ErrorCode.ORDER_IS_NOT_FIND); | |||||
| return new ResultData(wxOrders); | |||||
| } | |||||
| } | } | ||||
| @@ -154,6 +154,7 @@ public interface WxOrderService { | |||||
| WxOrderCouponVo detailCUserVo(WxOrder record); | WxOrderCouponVo detailCUserVo(WxOrder record); | ||||
| List<WxOrderCouponVo> goodsDetailCUserVo(WxOrder wxOrder); | |||||
| void stockBack(WxOrder updateOrder); | void stockBack(WxOrder updateOrder); | ||||
| @@ -242,4 +243,5 @@ public interface WxOrderService { | |||||
| //ResultData saveOrder(OrderSaveDto orderSaveDto,Long cUserId,EnumPayWay payWay,TenantEntity tenantEntity); | //ResultData saveOrder(OrderSaveDto orderSaveDto,Long cUserId,EnumPayWay payWay,TenantEntity tenantEntity); | ||||
| ResultData composeSaveOrder(boolean allowUnPayOrder,EnumComposeOrder composeOrderType,List<OrderComposeSaveDto> composeOrderSaveDto,Long cUserId,EnumPayWay payWay,TenantEntity tenantEntity); | ResultData composeSaveOrder(boolean allowUnPayOrder,EnumComposeOrder composeOrderType,List<OrderComposeSaveDto> composeOrderSaveDto,Long cUserId,EnumPayWay payWay,TenantEntity tenantEntity); | ||||
| } | } | ||||
| @@ -1742,6 +1742,11 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @Override | |||||
| public List<WxOrderCouponVo> goodsDetailCUserVo(WxOrder record) { | |||||
| return wxOrderMapper.selectDetailOfCUser(record); | |||||
| } | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void shareForMicroPay(TenantEntity tenantEntity, Long orderId, Long payOrderId,EnumPayWay payWay) { | public void shareForMicroPay(TenantEntity tenantEntity, Long orderId, Long payOrderId,EnumPayWay payWay) { | ||||