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) {
log.error("HighCouponController -> upShelfApprove() error!","卡卷库存数量错误");
@ -326,19 +326,27 @@ public class HighCouponController {
}
}
HighApprove approve = new HighApprove();
approve.setObjectType(ApproveType.UP_SHELF_APPROVE.getType());
approve.setObjectId(id);
approve.setObjectName(coupon.getCouponName());
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());
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);
approve.setObjectName(coupon.getCouponName());
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("操作成功");
} 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,21 +174,26 @@ public class HighUserCardServiceImpl implements HighUserCardService {
@Override
public Integer getBlxCouponBalance(String phone) {
if (phone == null) {
return 0;
}
try {
if (phone == null) {
return 0;
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("userMobile" , phone);
JSONObject jsonObject = new JSONObject();
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) {
num = object.getJSONObject("data").getInteger("total");
if (object.getInteger("code") == 1) {
num = object.getJSONObject("data").getInteger("total");
}
return num;
} catch (Exception e) {
return 0;
}
return num;
}
}

Loading…
Cancel
Save