'修复已知问题'

dev-discount
199901012 4 years ago
parent f7881ca89b
commit 43a1483cd4
  1. 16
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  2. 5
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  3. 2
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -167,6 +167,22 @@ public class HighOrderController {
} }
} }
@RequestMapping(value = "/cancelOrder", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "取消订单")
public ResponseData cancelOrder(@RequestParam(name = "orderId", required = true) Long orderId) {
try {
highOrderService.cancelOrder(orderId);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOrderController --> cancelOrder() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getUserOrderList", method = RequestMethod.GET) @RequestMapping(value = "/getUserOrderList", method = RequestMethod.GET)
@ResponseBody @ResponseBody

@ -142,6 +142,7 @@ public class HighOrderServiceImpl implements HighOrderService {
if (highChildOrder.getGoodsType() == 1) { if (highChildOrder.getGoodsType() == 1) {
HighCouponCode code = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId()); HighCouponCode code = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId());
code.setStatus(2); // 状态:1.待销售 2.未使用 3.已使用 99.预支付 code.setStatus(2); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
code.setReceiveTime(new Date());
highCouponCodeService.updateCouponCode(code); highCouponCodeService.updateCouponCode(code);
// 卡卷关联用户 // 卡卷关联用户
@ -150,6 +151,7 @@ public class HighOrderServiceImpl implements HighOrderService {
highUserCoupon.setCouponId(code.getCouponId()); highUserCoupon.setCouponId(code.getCouponId());
highUserCoupon.setUserId(highOrder.getMemId()); highUserCoupon.setUserId(highOrder.getMemId());
highUserCoupon.setCouponCodeId(code.getId()); highUserCoupon.setCouponCodeId(code.getId());
highUserCoupon.setCreateTime(new Date());
highUserCoupon.setUseEndTime(code.getUseEndTime()); highUserCoupon.setUseEndTime(code.getUseEndTime());
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponMapper.insert(highUserCoupon); highUserCouponMapper.insert(highUserCoupon);
@ -230,7 +232,7 @@ public class HighOrderServiceImpl implements HighOrderService {
@Override @Override
public List<HighOrder> getCloseOrder() { public List<HighOrder> getCloseOrder() {
return null; return highOrderMapperExt.getCloseOrder();
} }
@Override @Override
@ -266,6 +268,7 @@ public class HighOrderServiceImpl implements HighOrderService {
if (highChildOrder.getGoodsType() == 1) { if (highChildOrder.getGoodsType() == 1) {
// 查询卡卷详情 // 查询卡卷详情
HighCouponCode couponCode = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId()); HighCouponCode couponCode = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId());
couponCode.setChildOrderId(null);
couponCode.setStatus(1); // 状态:1.待销售 2.未使用 3.已使用 99.预支付 couponCode.setStatus(1); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
highCouponCodeService.updateCouponCode(couponCode); highCouponCodeService.updateCouponCode(couponCode);
} }

@ -67,6 +67,7 @@ public class GoodsOrderServiceImpl implements PayService {
highChildOrder.setChildOrdeStatus(2); // 子订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 highChildOrder.setChildOrdeStatus(2); // 子订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
HighCouponCode code = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId()); HighCouponCode code = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId());
code.setStatus(2); // 状态:1.待销售 2.未使用 3.已使用 99.预支付 code.setStatus(2); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
code.setReceiveTime(new Date());
highCouponCodeService.updateCouponCode(code); highCouponCodeService.updateCouponCode(code);
// 卡卷关联用户 // 卡卷关联用户
@ -75,6 +76,7 @@ public class GoodsOrderServiceImpl implements PayService {
highUserCoupon.setCouponId(code.getCouponId()); highUserCoupon.setCouponId(code.getCouponId());
highUserCoupon.setUserId(order.getMemId()); highUserCoupon.setUserId(order.getMemId());
highUserCoupon.setCouponCodeId(code.getId()); highUserCoupon.setCouponCodeId(code.getId());
highUserCoupon.setCreateTime(new Date());
highUserCoupon.setUseEndTime(code.getUseEndTime()); highUserCoupon.setUseEndTime(code.getUseEndTime());
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponMapper.insert(highUserCoupon); highUserCouponMapper.insert(highUserCoupon);

Loading…
Cancel
Save