new-dev
袁野 1 year ago
parent bfb297ab08
commit f091875cb7
  1. 10
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  2. 9
      hai-cweb/src/main/java/com/cweb/controller/HighDiscountPackageController.java
  3. 18
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderCreateHandleServiceImpl.java
  4. 5
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderServiceImpl.java
  5. 5
      hai-service/src/main/java/com/hai/service/impl/HighUserCardServiceImpl.java

@ -318,7 +318,7 @@ public class HighCouponController {
}
// 中石化
if (coupon.getCouponSource() != null && (coupon.getCouponSource() != 4 && coupon.getCouponSource() != 5)) {
if (coupon.getCouponSource() != null && (coupon.getCouponSource() != 4 && coupon.getCouponSource() != 5 && coupon.getCouponSource() != 6)) {
// 根据卡卷查询 销售码库存
if (highCouponCodeService.getStockCountByCoupon(coupon.getId()) == 0) {
log.error("HighCouponController -> upShelfApprove() error!","卡卷库存数量错误");
@ -326,6 +326,11 @@ public class HighCouponController {
}
}
if (coupon.getCompanyId() == 57) {
coupon.setStatus(2);
highCouponService.updateCoupon(coupon);
coupon.setUpdateTime(new Date());
} else {
HighApprove approve = new HighApprove();
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType());
approve.setObjectId(id);
@ -339,6 +344,9 @@ public class HighCouponController {
// 增加审批
highApproveService.insertApprove(approve);
}
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {

@ -36,15 +36,6 @@ public class HighDiscountPackageController {
private static Logger log = LoggerFactory.getLogger(HighDiscountPackageController.class);
@Autowired
private UserCenter userCenter;
@Resource
private CommonService commonService;
@Resource
private BsCompanyService bsCompanyService;
@Resource
private HighDiscountPackageService highDiscountPackageService;

@ -9,6 +9,7 @@ import com.hai.config.DataUtilConfig;
import com.hai.config.QianZhuConfig;
import com.hai.entity.*;
import com.hai.openApi.config.PriceComputeConfig;
import com.hai.openApi.service.ApiBlxCouponService;
import com.hai.openApi.service.ApiMchProductService;
import com.hai.openApi.service.ApiOrderCreateHandleService;
import com.hai.openApi.type.OperatorTypeEnum;
@ -47,6 +48,9 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
@Resource
private ApiProductService apiProductService;
@Resource
private ApiBlxCouponService apiBlxCouponService;
@Override
public ApiOrder oilHandle(JSONObject object) throws Exception {
@ -349,6 +353,20 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
// 查询api商户
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId"));
ApiBlxCoupon apiBlxCoupon = apiBlxCouponService.findBlxCoupon(object.getString("couponCode"));
// 查询折扣比例
Map<String, Object> mapProduct = new HashMap<>();
mapProduct.put("mchId" , object.getString("merchId"));
mapProduct.put("productType" , OrderProductType.PRODUCT_TYPE13.getNumber());
ApiMchProduct apiMchProducts = apiMchProductService.findByMap(mapProduct);
BigDecimal priceTotal = new BigDecimal(0);
BigDecimal facePrice = new BigDecimal(0);
return null;
}
}

@ -203,8 +203,9 @@ public class ApiOrderServiceImpl implements ApiOrderService {
orderService.createOrder(createOrderModel);
}
// 处理话费充值订单
// 处理停车券订单
if (OrderProductType.PRODUCT_TYPE13.getNumber().equals(object.getInteger("productType"))) {
apiOrder = orderCreateHandleService.mobileHandle(object);
// 组装子订单内容
@ -222,9 +223,11 @@ public class ApiOrderServiceImpl implements ApiOrderService {
// 组装订单
createOrderModel.getChildOrderList().add(createOrderChildModel);
orderService.createOrder(createOrderModel);
}
apiOrder.setOrderNo(createOrderModel.getOrderNo());
apiOrder.setStatus(1);

@ -174,6 +174,7 @@ public class HighUserCardServiceImpl implements HighUserCardService {
@Override
public Integer getBlxCouponBalance(String phone) {
try {
if (phone == null) {
return 0;
}
@ -190,5 +191,9 @@ public class HighUserCardServiceImpl implements HighUserCardService {
}
return num;
} catch (Exception e) {
return 0;
}
}
}

Loading…
Cancel
Save