new-dev
袁野 1 year ago
parent bfb297ab08
commit f091875cb7
  1. 34
      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. 25
      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,19 +326,27 @@ public class HighCouponController {
} }
} }
HighApprove approve = new HighApprove(); if (coupon.getCompanyId() == 57) {
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType()); coupon.setStatus(2);
approve.setObjectId(id); highCouponService.updateCoupon(coupon);
approve.setObjectName(coupon.getCouponName()); coupon.setUpdateTime(new Date());
approve.setApproveSerialNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); } else {
approve.setStatus(1); HighApprove approve = new HighApprove();
approve.setCreateTime(new Date()); approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType());
approve.setUpdateTime(new Date()); approve.setObjectId(id);
approve.setSubmitOperatorId(userInfoModel.getSecUser().getId()); approve.setObjectName(coupon.getCouponName());
approve.setSubmitOperatorName(userInfoModel.getSecUser().getUserName()); approve.setApproveSerialNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss"));
approve.setStatus(1);
approve.setCreateTime(new Date());
approve.setUpdateTime(new Date());
approve.setSubmitOperatorId(userInfoModel.getSecUser().getId());
approve.setSubmitOperatorName(userInfoModel.getSecUser().getUserName());
// 增加审批
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,21 +174,26 @@ public class HighUserCardServiceImpl implements HighUserCardService {
@Override @Override
public Integer getBlxCouponBalance(String phone) { public Integer getBlxCouponBalance(String phone) {
if (phone == null) { try {
return 0; if (phone == null) {
} return 0;
}
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("userMobile" , phone); jsonObject.put("userMobile" , phone);
JSONObject object = blxConfig.getUserCouponPage(jsonObject); JSONObject object = blxConfig.getUserCouponPage(jsonObject);
int num = 0; int num = 0;
if (object.getInteger("code") == 1) { if (object.getInteger("code") == 1) {
num = object.getJSONObject("data").getInteger("total"); num = object.getJSONObject("data").getInteger("total");
}
return num;
} catch (Exception e) {
return 0;
} }
return num;
} }
} }

Loading…
Cancel
Save