提交代码

master
胡锐 6 months ago committed by yuanye
parent 3c4ef583df
commit 9d0ed68c01
  1. 9
      order/src/main/java/com/order/controller/business/OrderCouponController.java
  2. 1
      service/src/main/java/com/hfkj/dao/BsOrderCouponMapperExt.java
  3. 4
      service/src/main/java/com/hfkj/service/coupon/BsOrderCouponService.java
  4. 10
      service/src/main/java/com/hfkj/service/coupon/impl/BsOrderCouponServiceImpl.java
  5. 4
      service/src/main/java/com/hfkj/service/order/OrderCancelService.java
  6. 6
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java

@ -36,11 +36,14 @@ public class OrderCouponController {
@RequestMapping(value="/queryDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询交易订单详情")
public ResponseData queryDetail(@RequestParam(value = "orderChildOrderNo" , required = true) String orderChildOrderNo) {
public ResponseData queryDetail(@RequestParam(value = "orderChildNo" , required = true) String orderChildNo) {
try {
Map<String,Object> param = new HashMap<>();
param.put("orderNo", orderCouponService.getListByChildOrderNo(orderChildOrderNo));
param.put("goods", null);
param.put("order", orderCouponService.getDetailByChildOrderNo(orderChildNo));
Map<String,Object> goodsParam = new HashMap<>();
goodsParam.put("orderChildNo", orderChildNo);
param.put("goods", orderCouponService.getOrderList(goodsParam));
return ResponseMsgUtil.success(param);

@ -44,6 +44,7 @@ public interface BsOrderCouponMapperExt {
" LEFT JOIN bs_order_coupon b on a.coupon_order_id = b.id" +
" WHERE 1 = 1" +
" <if test='param.orderNo != null'> and b.order_no like concat('%',#{param.orderNo},'%') </if>" +
" <if test='param.orderChildNo != null'> and b.child_order_no = #{param.orderChildNo} </if>" +
" <if test='param.userPhone != null'> and b.user_phone like concat('%',#{param.userPhone},'%') </if>" +
" <if test='param.payType != null'> and b.pay_type = #{param.payType}</if>" +
" <if test='param.tradeStatus != null'> and b.status = #{param.tradeStatus}</if>" +

@ -22,10 +22,10 @@ public interface BsOrderCouponService {
/**
* 查询卡券订单
* @param orderChildOrderNo 子订单号
* @param orderChildNo 子订单号
* @return
*/
List<BsOrderCoupon> getListByChildOrderNo(String orderChildOrderNo);
BsOrderCoupon getDetailByChildOrderNo(String orderChildNo);
/**
* 查询卡券订单

@ -37,10 +37,14 @@ public class BsOrderCouponServiceImpl implements BsOrderCouponService {
}
@Override
public List<BsOrderCoupon> getListByChildOrderNo(String orderChildOrderNo) {
public BsOrderCoupon getDetailByChildOrderNo(String orderChildNo) {
BsOrderCouponExample example = new BsOrderCouponExample();
example.createCriteria().andChildOrderNoEqualTo(orderChildOrderNo);
return orderCouponMapper.selectByExample(example);
example.createCriteria().andChildOrderNoEqualTo(orderChildNo);
List<BsOrderCoupon> list = orderCouponMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override

@ -66,14 +66,12 @@ public class OrderCancelService {
// 实物
} else if (goodsMsg.getType() == 2) {
// 虚拟
List<BsOrderCoupon> orderCouponList = orderCouponService.getListByChildOrderNo(orderChild.getChildOrderNo());
for(BsOrderCoupon orderCoupon : orderCouponList) {
BsOrderCoupon orderCoupon = orderCouponService.getDetailByChildOrderNo(orderChild.getChildOrderNo());
orderCoupon.setCancelTime(new Date());
orderCoupon.setStatus(OrderChildStatusEnum.status5.getCode());
orderCouponService.editData(orderCoupon);
}
}
}
}

@ -90,8 +90,7 @@ public class OrderPaySuccessService {
*/
public void productVpd(OrderModel order, BsOrderChild childOrder) throws Exception {
// 查询卡券订单
List<BsOrderCoupon> orderCouponList = orderCouponService.getListByChildOrderNo(childOrder.getChildOrderNo());
for (BsOrderCoupon orderCoupon : orderCouponList) {
BsOrderCoupon orderCoupon = orderCouponService.getDetailByChildOrderNo(childOrder.getChildOrderNo());
// 查询卡券订单的卡密
List<BsOrderCouponNo> couponNoList = orderCouponNoService.getListByCouponOrderId(orderCoupon.getId());
for (BsOrderCouponNo couponNo : couponNoList) {
@ -195,7 +194,4 @@ public class OrderPaySuccessService {
orderCoupon.setPaySerialNo(order.getPaySerialNo());
orderCouponService.editData(orderCoupon);
}
}
}

Loading…
Cancel
Save