提交代码

dev-discount
胡锐 2 years ago
parent e5c17730ca
commit 4af688d7b2
  1. 2
      .gitignore
  2. 1
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  3. 2
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  4. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  5. 4
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java

2
.gitignore vendored

@ -41,8 +41,6 @@ hai-user/log/*
hai-user/hai-user.iml
hai-service/hai-service.iml
hai-bweb/src/main/java/com/bweb/controller/ApiIpAddressController.java
hai-service/src/main/java/com/hai/dao/ApiIpAddressMapper.java

@ -163,6 +163,7 @@ public class HighCouponController {
highCoupon.setCreateTime(new Date());
highCoupon.setUpdateTime(new Date());
highCoupon.setStatus(1); // 状态:0.删除 1.编辑中 2.已上架 3.已下架 101.上架审批中 102.上架审批驳回
highCoupon.setSalesCount(0);
highCouponService.insertCoupon(highCoupon);
return ResponseMsgUtil.success(highCoupon);

@ -15,7 +15,7 @@ public class CommonSysConfig {
// 加油站默认图片
private String gasDefaultOilStationImg;
// 重庆壳牌
// 重庆中石油
private String ChongQingCnpcUrl; // 请求地址
private String ChongQingCnpcMerNo; // 商户号
private String ChongQingCnpcMerKey; // 商户秘钥

@ -163,7 +163,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
String childOrderNo = OrderUtil.generateChildOrderNo();
// 如果不是来源不是贵州中石化,需要校验库存
if (!coupon.getCouponSource().equals(4) || !coupon.getCouponSource().equals(5)) {
if (!coupon.getCouponSource().equals(4) && !coupon.getCouponSource().equals(5)) {
if (couponService.assignOrderStock(coupon.getId(), childOrderNo) == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存不足");
}

@ -147,10 +147,10 @@ public class OrderServiceImpl implements OrderService {
order.setCompanyId(createOrderModel.getCompanyId());
/*********** 组装处理子订单 商品业务************/
List<HighChildOrder> childOrderList = new ArrayList<>();
for (CreateOrderChildModel child : createOrderModel.getChildOrderList()) {
child.setOrderNo(order.getOrderNo());
child.setMemId(order.getMemId());
child.setMemName(order.getMemName());
child.setMemPhone(order.getMemPhone());
@ -169,6 +169,7 @@ public class OrderServiceImpl implements OrderService {
/*********** 话费 请求数据************/
object.put("rechargeContent" , child.getRechargeContent());
object.put("goodsId" , child.getGoodsId());
// 购买卡券
if (child.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) {
order.setProductType(OrderProductType.PRODUCT_TYPE5.getNumber());
@ -400,7 +401,6 @@ public class OrderServiceImpl implements OrderService {
// 订单入库前处理
for (HighChildOrder childOrder : order.getHighChildOrderList()) {
childOrder.setOrderNo(order.getOrderNo());
childOrder.setSurplusRefundNum(childOrder.getSaleCount());
// 计算 子订单 在交易订单金额中的占比

Loading…
Cancel
Save