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) { if (highCouponCodeService.getStockCountByCoupon(coupon.getId()) == 0) {
log.error("HighCouponController -> upShelfApprove() error!","卡卷库存数量错误"); 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(); HighApprove approve = new HighApprove();
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType()); approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType());
approve.setObjectId(id); approve.setObjectId(id);
@ -339,6 +344,9 @@ public class HighCouponController {
// 增加审批 // 增加审批
highApproveService.insertApprove(approve); highApproveService.insertApprove(approve);
}
return ResponseMsgUtil.success("操作成功"); return ResponseMsgUtil.success("操作成功");
} catch (Exception e) { } catch (Exception e) {

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

@ -9,6 +9,7 @@ import com.hai.config.DataUtilConfig;
import com.hai.config.QianZhuConfig; import com.hai.config.QianZhuConfig;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.openApi.config.PriceComputeConfig; import com.hai.openApi.config.PriceComputeConfig;
import com.hai.openApi.service.ApiBlxCouponService;
import com.hai.openApi.service.ApiMchProductService; import com.hai.openApi.service.ApiMchProductService;
import com.hai.openApi.service.ApiOrderCreateHandleService; import com.hai.openApi.service.ApiOrderCreateHandleService;
import com.hai.openApi.type.OperatorTypeEnum; import com.hai.openApi.type.OperatorTypeEnum;
@ -47,6 +48,9 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
@Resource @Resource
private ApiProductService apiProductService; private ApiProductService apiProductService;
@Resource
private ApiBlxCouponService apiBlxCouponService;
@Override @Override
public ApiOrder oilHandle(JSONObject object) throws Exception { public ApiOrder oilHandle(JSONObject object) throws Exception {
@ -349,6 +353,20 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
// 查询api商户 // 查询api商户
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId")); 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; return null;
} }
} }

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

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

Loading…
Cancel
Save