diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java index 0bca3d78..8c58cf0b 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java @@ -370,7 +370,7 @@ public class HighUserController { HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); PageHelper.startPage(pageNum,pageSize); - return ResponseMsgUtil.success(new PageInfo<>(highOrderService.promoteOrderList(userInfoModel.getHighUser().getId()))); + return ResponseMsgUtil.success(new PageInfo<>(highOrderService.promoteOrderList(userInfoModel.getHighUser().getId().toString()))); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java index f10e35f0..1f4b50c8 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java @@ -253,7 +253,7 @@ public class HighOrderSchedule { * @Param [] * @return void */ - @Scheduled(cron="0 0/10 * * * ?") //每 5分钟执行一次 + @Scheduled(cron="0 0/1 * * * ?") //每 5分钟执行一次 public void integralRebateOrder() { // 查询满足初步返利条件订单 diff --git a/hai-service/src/main/java/com/hai/entity/HighOrder.java b/hai-service/src/main/java/com/hai/entity/HighOrder.java index 0c35ac2c..426ddafb 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrder.java @@ -251,6 +251,26 @@ public class HighOrder implements Serializable { private String ext6; + private String time; + + private String goodsTypeName; + + public String getGoodsTypeName() { + return goodsTypeName; + } + + public void setGoodsTypeName(String goodsTypeName) { + this.goodsTypeName = goodsTypeName; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + private static final long serialVersionUID = 1L; private List highChildOrderList; diff --git a/hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java b/hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java index 05fb79d7..ff8387fe 100644 --- a/hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java +++ b/hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java @@ -54,7 +54,7 @@ public interface OrderCreateHandleService { * @param createOrderChild * @return */ - HighChildOrder hltUnionCardRecharge(CreateOrderChildModel createOrderChild); + HighChildOrder hltUnionCardRecharge(HighOrder order, CreateOrderChildModel createOrderChild); /** * @Author Sum1Dream diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index f1b335f0..ee76255c 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -561,7 +561,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { } @Override - public HighChildOrder hltUnionCardRecharge(CreateOrderChildModel createOrderChild) { + public HighChildOrder hltUnionCardRecharge(HighOrder order, CreateOrderChildModel createOrderChild) { if (createOrderChild.getGoodsPrice() == null) { log.error("HighOrderController --> hltUnionCardRecharge() error!", "请设置充值金额"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请设置充值金额"); @@ -581,6 +581,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { childOrder.setMemId(createOrderChild.getMemId()); childOrder.setMemName(createOrderChild.getMemName()); childOrder.setMemPhone(createOrderChild.getMemPhone()); + childOrder.setOrderNo(order.getOrderNo()); childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo()); childOrder.setGoodsType(OrderChildGoodsType.TYPE8.getNumber()); childOrder.setGoodsId(user.getId()); diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java index 660a6c98..f9ddeefd 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java @@ -203,7 +203,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE7.getNumber())) { eCouponPackageHandle(order , childOrder); } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE8.getNumber())) { - hltUnionCardRechargeHandle(order); + hltUnionCardRechargeHandle(order , childOrder); } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE9.getNumber())) { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE10.getNumber())) { @@ -415,44 +415,18 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { * @Param [order] * @Return void */ - private void hltUnionCardRechargeHandle(HighOrder order) throws Exception { + private void hltUnionCardRechargeHandle(HighOrder order , HighChildOrder highChildOrder) throws Exception { // 汇联通充值 String goodsDesc = "汇联通充值"+order.getPayPrice()+"元"; String tranDesc = ""; String businessType = "ghk_deposit"; // 汇联通卡充值 - JSONObject deposit = HuiLianTongUnionCardConfig.deposit(order.getOrderNo(), order.getMemCardNo(), order.getPayPrice(), businessType, order.getPaySerialNo(), tranDesc); + JSONObject deposit = HuiLianTongUnionCardConfig.deposit(order.getOrderNo(), highChildOrder.getGoodsSpecName(), order.getPayPrice(), businessType, order.getPaySerialNo(), goodsDesc); // 汇联通充值回调解析 HuiLianTongUnionCardConfig.resolveResponse(deposit.getString("data")); -// Map dataMap = new HashMap<>(); -// dataMap.put("orderNo", order.getOrderNo()); -// dataMap.put("cardType", "ghk"); -// dataMap.put("cardNo", order.getMemCardNo()); -// dataMap.put("checkPassword", "N"); -// dataMap.put("tranAmount", order.getPayPrice()); -// dataMap.put("tranChannel", "HiSen"); -// dataMap.put("businessType", businessType); -// dataMap.put("goodsDesc", goodsDesc); -// dataMap.put("tranDesc", tranDesc); -// HighGasOrderPush payPush = new HighGasOrderPush(); -// payPush.setType(OrderPushType.type7.getType()); -// payPush.setOrderNo(order.getOrderNo()); -// payPush.setCreateTime(new Date()); -// payPush.setCode(deposit.getString("respCode")); -// payPush.setRequestContent(JSON.toJSONString(dataMap)); -// payPush.setReturnContent(deposit.toJSONString()); -// highGasOrderPushMapper.insert(payPush); -// -// if (!Objects.equals(deposit.getString("respCode"), "0000")) { -// throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , deposit.getString("respMessage")); -// } -// // 记录回调信息 -// if (!dataObject.getBoolean("success")) { -// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, dataObject.getString("message")); -// } } /** diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index e5f4ebe8..23c7a777 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -226,7 +226,7 @@ public class OrderServiceImpl implements OrderService { // 贵州汇联通工会卡充值 } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE8.getNumber())) { order.setProductType(OrderProductType.PRODUCT_TYPE8.getNumber()); - HighChildOrder childOrder = orderCreateHandleService.hltUnionCardRecharge(child); + HighChildOrder childOrder = orderCreateHandleService.hltUnionCardRecharge(order , child); childOrderList.add(childOrder); order.setTitle(childOrder.getGoodsName()); diff --git a/hai-service/src/main/java/com/hai/service/HighOrderService.java b/hai-service/src/main/java/com/hai/service/HighOrderService.java index df787daa..7e5276c3 100644 --- a/hai-service/src/main/java/com/hai/service/HighOrderService.java +++ b/hai-service/src/main/java/com/hai/service/HighOrderService.java @@ -548,7 +548,7 @@ public interface HighOrderService { * @Param [java.lang.Long] * @return java.util.List */ - List promoteOrderList(Long identificationCode) throws Exception; + List promoteOrderList(String identificationCode) throws Exception; /** * @Author Sum1Dream diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 778ad95b..72f60aff 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -2242,20 +2242,20 @@ public class HighOrderServiceImpl implements HighOrderService { } @Override - public List promoteOrderList(Long identificationCode) throws Exception { + public List promoteOrderList(String identificationCode) throws Exception { HighOrderExample example = new HighOrderExample(); HighOrderExample.Criteria criteria = example.createCriteria(); - //criteria.andIdentificationCodeEqualTo(identificationCode).andOrderStatusEqualTo(3); + criteria.andPromoteCodeEqualTo(identificationCode).andOrderStatusEqualTo(3); List list = highOrderMapper.selectByExample(example); -/* + for (HighOrder order : list) { order.setTime(DateUtil.date2String(order.getCreateTime() , "MM月dd日 HH:mm")); List childOrder = getChildOrderByOrder(order.getId()); order.setGoodsTypeName("购买:" + GoodsType.getNameByType(childOrder.get(0).getGoodsType())); - }*/ + } return list; } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java index 0617f0a8..513690d9 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java @@ -121,10 +121,11 @@ public class HighUserServiceImpl implements HighUserService { } SecRegion region = commonService.getRegionsByName(loginLog.getProvinceName()); - if (region != null) { - // 绑定推广关联关系 - distributionUserRelService.insertDistributionRebate(user.getId(), popularizeUserId, region.getRegionId().toString()); - } + distributionUserRelService.insertDistributionRebate(user.getId(), popularizeUserId, "500000"); +// if (region != null) { +// // 绑定推广关联关系 +// distributionUserRelService.insertDistributionRebate(user.getId(), popularizeUserId, region.getRegionId().toString()); +// } } loginLog.setUserId(user.getId()); userLoginLogMapper.insert(loginLog);