From a74da6f0884f540c95acd1f6375c32530010eb29 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Thu, 16 Jun 2022 16:39:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=9D=E8=B4=B9?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImportRechargeOrderListener.java | 3 +- .../java/com/hai/config/CommonSysConfig.java | 6 +- .../com/hai/config/HuiLianTongConfig.java | 40 +++-- .../java/com/hai/config/RechargeConfig.java | 5 +- .../impl/OutRechargeOrderServiceImpl.java | 163 ++++++++++-------- 5 files changed, 118 insertions(+), 99 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/excelListener/ImportRechargeOrderListener.java b/hai-bweb/src/main/java/com/bweb/excelListener/ImportRechargeOrderListener.java index 6bc3aae8..75beca3b 100644 --- a/hai-bweb/src/main/java/com/bweb/excelListener/ImportRechargeOrderListener.java +++ b/hai-bweb/src/main/java/com/bweb/excelListener/ImportRechargeOrderListener.java @@ -40,7 +40,7 @@ public class ImportRechargeOrderListener extends AnalysisEventListener { - if (object1 != null && object1.getString("result").equals("success")) { - JSONArray dataArray = object1.getJSONArray("data"); - for (Object data : dataArray) { - JSONObject dataObject = (JSONObject) data; - Map mapPost = new HashMap<>(); - mapPost.put("orderNo" , orderNo); - mapPost.put("distCouCount" , "1"); - mapPost.put("phone" , userPhone); - mapPost.put("distributorId" , "1JnL8YMV"); - mapPost.put("couNo" , dataObject.getString("couNo")); - mapPost.put("status" , "20"); - mapPost.put("couTypeCode" , dataObject.getString("couTypeCode")); - mapPost.put("validStartDate" , dataObject.getDate("validStartDate")); - mapPost.put("validEndDate" , dataObject.getDate("validEndDate")); - try { - HuiLianTongUnionCardConfig.syncPayOrder(mapPost); - } catch (Exception e) { - e.printStackTrace(); + try { + if (object1 != null && object1.getString("result").equals("success")) { + JSONArray dataArray = object1.getJSONArray("data"); + for (Object data : dataArray) { + JSONObject dataObject = (JSONObject) data; + Map mapPost = new HashMap<>(); + mapPost.put("orderNo" , orderNo); + mapPost.put("distCouCount" , "1"); + mapPost.put("phone" , userPhone); + mapPost.put("distributorId" , "1JnL8YMV"); + mapPost.put("couNo" , dataObject.getString("couNo")); + mapPost.put("status" , "20"); + mapPost.put("couTypeCode" , dataObject.getString("couTypeCode")); + mapPost.put("validStartDate" , dataObject.getDate("validStartDate")); + mapPost.put("validEndDate" , dataObject.getDate("validEndDate")); + JSONObject o = HuiLianTongUnionCardConfig.syncPayOrder(mapPost); + System.out.println("订单同步请求参数---------" + mapPost); + System.out.println("订单同步请求结果---------" + o); + } } + } catch (Exception e) { + e.printStackTrace(); } }).start(); diff --git a/hai-service/src/main/java/com/hai/config/RechargeConfig.java b/hai-service/src/main/java/com/hai/config/RechargeConfig.java index fcb87dbd..003dc7bc 100644 --- a/hai-service/src/main/java/com/hai/config/RechargeConfig.java +++ b/hai-service/src/main/java/com/hai/config/RechargeConfig.java @@ -63,7 +63,7 @@ public class RechargeConfig { paramMap.put("out_trade_num" , object.getString("out_trade_num")); paramMap.put("product_id" , object.getString("product_id")); paramMap.put("mobile" , object.getString("mobile")); - paramMap.put("notify_url" , CommonSysConst.getSysConfig().getLyNotifyUrl()); + paramMap.put("notify_url" , object.getString("notifyUrl")); paramMap.put("userid" , CommonSysConst.getSysConfig().getLyMemberId()); paramMap.put("sign", WxUtils.generateSignatureLy(paramMap , CommonSysConst.getSysConfig().getLyApiKey() , WXPayConstants.SignType.MD5)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getLyPostUrl()+ "index/recharge", paramMap); @@ -108,8 +108,7 @@ public class RechargeConfig { map.put("app_key" , CommonSysConst.getSysConfig().getJjAppKey()); map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); map.put("is_fast" , object.getString("is_fast")); - map.put("notify_url" , CommonSysConst.getSysConfig().getJjNotifyUrl()); - + map.put("notify_url" , object.getString("notifyUrl")); String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getJjAppSecret() , WXPayConstants.SignType.MD5); map.put("sign" , signStr); diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java index 5fa951ac..7684bf54 100644 --- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -596,91 +596,86 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { if (order.getRechargeStatus() == 201) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单处于充值中状态"); } - - // 1:支付宝 2:微信 3:汇联通工会卡 4:银联 5:银联分期 - if (order.getPayType() == null) { - // 退还积分 - if (order.getIntegralNum() != null) { - highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); - if (order.getPayRealPrice().compareTo(new BigDecimal(0)) == 0) { - order.setPayStatus(105); - order.setRechargeStatus(203); - order.setRefundTime(new Date()); - outRechargeOrderService.updateOrder(order); - } + // 退还积分 + if (order.getIntegralNum() != null) { + highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); + if (order.getPayRealPrice().compareTo(new BigDecimal(0)) == 0) { + order.setPayStatus(105); + order.setRechargeStatus(203); + order.setRefundTime(new Date()); + outRechargeOrderService.updateOrder(order); } - } else { - // 微信退款 - if (order.getPayType() == 2) { - Map param = new HashMap<>(); - param.put("appid", "wx637bd6f7314daa46"); - param.put("mch_id", "1289663601"); - param.put("sub_mch_id", "1614670195"); - param.put("nonce_str", WxUtils.makeNonStr()); - param.put("transaction_id", order.getPaySerialNo()); - param.put("out_refund_no", "HFR" + new Date().getTime()); - param.put("total_fee", String.valueOf(order.getPayRealPrice().multiply(new BigDecimal("100")).intValue())); - param.put("refund_fee", String.valueOf(order.getPayRealPrice().multiply(new BigDecimal("100")).intValue())); - param.put("sign_type", "HMAC-SHA256"); - - String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); - param.put("sign", signStr); - - String resultXmL = doRefundRequest(param.get("mch_id"), WxUtils.mapToXml(param)); - OrderRefundModel orderRefundModel = XmlUtil.getObjectFromXML(resultXmL, OrderRefundModel.class); - if (orderRefundModel.getResult_code().equals("SUCCESS")) { - order.setPayStatus(105); - order.setRechargeStatus(203); - order.setRefundTime(new Date()); - order.setOutRefundNo(orderRefundModel.getOut_refund_no()); - order.setRefundId(orderRefundModel.getRefund_id()); - order.setRefundFee(new BigDecimal(orderRefundModel.getRefund_fee()).divide(new BigDecimal("100"))); - outRechargeOrderService.updateOrder(order); - } else { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!错误代码:" + orderRefundModel.getErr_code() + ",错误描述" + orderRefundModel.getErr_code_des()); - } + } + // 微信退款 + if (order.getPayType() == 2) { + Map param = new HashMap<>(); + param.put("appid", "wx637bd6f7314daa46"); + param.put("mch_id", "1289663601"); + param.put("sub_mch_id", "1614670195"); + param.put("nonce_str", WxUtils.makeNonStr()); + param.put("transaction_id", order.getPaySerialNo()); + param.put("out_refund_no", "HFR" + new Date().getTime()); + param.put("total_fee", String.valueOf(order.getPayRealPrice().multiply(new BigDecimal("100")).intValue())); + param.put("refund_fee", String.valueOf(order.getPayRealPrice().multiply(new BigDecimal("100")).intValue())); + param.put("sign_type", "HMAC-SHA256"); + + String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); + param.put("sign", signStr); + + String resultXmL = doRefundRequest(param.get("mch_id"), WxUtils.mapToXml(param)); + OrderRefundModel orderRefundModel = XmlUtil.getObjectFromXML(resultXmL, OrderRefundModel.class); + if (orderRefundModel.getResult_code().equals("SUCCESS")) { + order.setPayStatus(105); + order.setRechargeStatus(203); + order.setRefundTime(new Date()); + order.setOutRefundNo(orderRefundModel.getOut_refund_no()); + order.setRefundId(orderRefundModel.getRefund_id()); + order.setRefundFee(new BigDecimal(orderRefundModel.getRefund_fee()).divide(new BigDecimal("100"))); + outRechargeOrderService.updateOrder(order); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!错误代码:" + orderRefundModel.getErr_code() + ",错误描述" + orderRefundModel.getErr_code_des()); } + } - // 工会卡退款 - if (order.getPayType() == 3) { - JSONObject jsonObject = HuiLianTongUnionCardConfig.refund("HFR" + new Date().getTime(), order.getOrderNo()); - - if (jsonObject == null) { - jsonObject = HuiLianTongUnionCardConfig.refund("HFR" + new Date().getTime(), order.getOrderNo()); - } - - JSONObject dataObject = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); - - if (dataObject.getBoolean("success") || Objects.equals(dataObject.getString("message"), "原交易已撤销,不可再次操作")) { - order.setPayStatus(105); - order.setRechargeStatus(203); - order.setRefundTime(new Date()); - order.setOutRefundNo("HFR" + new Date().getTime()); - order.setRefundFee(order.getPayRealPrice()); - order.setRefundId(dataObject.getString("orderId")); - outRechargeOrderService.updateOrder(order); + // 工会卡退款 + if (order.getPayType() == 3) { + JSONObject jsonObject = HuiLianTongUnionCardConfig.refund("HFR" + new Date().getTime(), order.getOrderNo()); - } else { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, dataObject.getString("message")); - } + if (jsonObject == null) { + jsonObject = HuiLianTongUnionCardConfig.refund("HFR" + new Date().getTime(), order.getOrderNo()); } - // 银联退款 - if (order.getPayType() == 4) { - // 订单退款 - JSONObject refund = UnionPayConfig.zwrefund(UnionPayConfig.MER_ID2, UnionPayConfig.TERM_ID2, order.getOrderNo(), order.getPaySerialNo(), order.getPayRealPrice().multiply(new BigDecimal("100")).longValue()); - if (!refund.getString("resultcode").equals("W6")) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refund.getString("returnmsg")); - } + JSONObject dataObject = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); + + if (dataObject.getBoolean("success") || Objects.equals(dataObject.getString("message"), "原交易已撤销,不可再次操作")) { order.setPayStatus(105); order.setRechargeStatus(203); order.setRefundTime(new Date()); - order.setOutRefundNo(refund.getString("oriwtorderid")); + order.setOutRefundNo("HFR" + new Date().getTime()); order.setRefundFee(order.getPayRealPrice()); + order.setRefundId(dataObject.getString("orderId")); outRechargeOrderService.updateOrder(order); + + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, dataObject.getString("message")); } } + // 银联退款 + if (order.getPayType() == 4) { + // 订单退款 + JSONObject refund = UnionPayConfig.zwrefund(UnionPayConfig.MER_ID2, UnionPayConfig.TERM_ID2, order.getOrderNo(), order.getPaySerialNo(), order.getPayRealPrice().multiply(new BigDecimal("100")).longValue()); + if (!refund.getString("resultcode").equals("W6")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refund.getString("returnmsg")); + } + order.setPayStatus(105); + order.setRechargeStatus(203); + order.setRefundTime(new Date()); + order.setOutRefundNo(refund.getString("oriwtorderid")); + order.setRefundFee(order.getPayRealPrice()); + outRechargeOrderService.updateOrder(order); + } + if (order.getMemDiscountId() != null) { HighDiscountUserRel rel = highDiscountUserRelService.getRelById(order.getMemDiscountId()); @@ -755,6 +750,23 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { outRechargeChildOrderService.updateOrder(childOrder); type = childOrder.getRechargePlatform(); + } else { + // 查询充值子订单 + Map childOrderMap103 = new HashMap<>(); + + childOrderMap.put("parent_order_id", outRechargeOrder.getId()); + childOrderMap.put("status", 103); + + List childOrderList103 = outRechargeChildOrderService.getListRechargeChildOrder(childOrderMap103); + if (childOrderList103.size() > 0) { + type = childOrderList103.get(0).getRechargePlatform(); + } + } + + if (type == 2) { + type = 1; + } else { + type++; } JSONObject object = new JSONObject(); @@ -765,10 +777,12 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { for (String s : rechargePlatform) { // 尖椒充值 - if (s.equals("1") && (type == 2 || type == 0)) { + if (s.equals("1") && type == 1) { object.put("out_order_id", orderNo); object.put("amount", outRechargePrice.getRechargePrice()); object.put("mobile", outRechargeOrder.getRechargeContent()); + object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); + System.out.println("尖椒请求回调地址---------------------" + CommonSysConst.getSysConfig().getJjNotifyUrl()); if (outRechargePrice.getRechargeType() == 1) { object.put("is_fast", 1); } @@ -782,11 +796,14 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { rechargePlatformType = 1; break; } - if (s.equals("2") && (type == 1 || type == 0)) { + // 龙阅充值 + if (s.equals("2") && type == 2) { object.put("out_trade_num", orderNo); object.put("product_id", outRechargePrice.getGoodsId()); object.put("mobile", outRechargeOrder.getRechargeContent()); + object.put("notifyUrl", CommonSysConst.getSysConfig().getLyNotifyUrl()); JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); + System.out.println("龙阅请求回调地址---------------------" + CommonSysConst.getSysConfig().getLyNotifyUrl()); object.put("return_content", returnObject); if (returnObject != null && returnObject.getLong("errno") == 0) { childOrder.setStatus(102); From a80c81224b20cdba8bf5348e28f1f338d330b078 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Fri, 17 Jun 2022 14:26:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hai/service/impl/OutRechargeOrderServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java index 7684bf54..6766d5fa 100644 --- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -773,7 +773,13 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { String orderNo = "CZ" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5); - String[] rechargePlatform = outRechargePrice.getRechargePlatform().split("-"); + String string = outRechargePrice.getRechargePlatform().substring(1,outRechargePrice.getRechargePlatform().length()-1); + + String[] rechargePlatform = string.split("-"); + + if (string.length() == 1) { + type = Integer.parseInt(string); + } for (String s : rechargePlatform) { // 尖椒充值 From 62a73d7088dd6ff85c70a212eed2a80d644aad9c Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Mon, 20 Jun 2022 15:16:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hai/schedule/HighOrderSchedule.java | 6 +++--- .../com/hai/service/impl/HltUnionCardVipServiceImpl.java | 2 +- .../com/hai/service/impl/OutRechargeOrderServiceImpl.java | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) 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 622b2dfb..dc513c08 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java @@ -95,16 +95,16 @@ public class HighOrderSchedule { @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 public void initRechargeOrder() { Map map = new HashMap<>(); - map.put("status" , String.valueOf(102)); + map.put("payStatus" , String.valueOf(102)); map.put("rechargeStatus" , String.valueOf(204)); List orderList = outRechargeOrderService.getListRechargeOrder(map); - if (orderList != null && orderList.size() > 0) { + System.out.println("订单数量------------------------------------------------------------------------------" + orderList.size()); + if (orderList.size() > 0) { for (OutRechargeOrder order : orderList) { try { // 查询充值子订单 Map childOrderMap = new HashMap<>(); - childOrderMap.put("parent_order_id" , order.getId()); childOrderMap.put("status" , 102); diff --git a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java index 72e407f7..a3e2f0f5 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java @@ -200,7 +200,7 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService { } else { if (equityLevel == 1) { HuiLianTongUnionCardConfig.submitSms(phone , "“E信通会员专属”3张4元话费券、2张96折加油券已到账,打开“嗨森逛”微信小程序>我的>我的优惠券即可直接使用,到账之日起1月内(30天)有效。"); - } else { + } else if (equityLevel == 2){ HuiLianTongUnionCardConfig.submitSms(phone , "“工会卡用户专属”2元话费券、2张96折加油券已到账,打开“嗨森逛”微信小程序>我的>我的优惠券即可直接使用,到账之日起1月内(30天)有效。"); } } diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java index 6766d5fa..30846ad2 100644 --- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -587,6 +587,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { public void rechargeOrderToRefund(Long orderId) throws Exception { OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId); + System.out.println("发起退款------------------------------------------------------------------------------" + orderId); // 101.待支付 102.已支付 100.已完成 104.已取消 105.已退款 if (order.getPayStatus() != 102) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单不处于已支付状态"); @@ -596,8 +597,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { if (order.getRechargeStatus() == 201) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单处于充值中状态"); } + // 退还积分 - if (order.getIntegralNum() != null) { + if (order.getIntegralNum().compareTo(new BigDecimal(0)) > 0) { highUserService.goldHandle(order.getUserId(), order.getIntegralNum().intValue(), 1, 3, order.getId()); if (order.getPayRealPrice().compareTo(new BigDecimal(0)) == 0) { order.setPayStatus(105); @@ -788,8 +790,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { object.put("amount", outRechargePrice.getRechargePrice()); object.put("mobile", outRechargeOrder.getRechargeContent()); object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); - System.out.println("尖椒请求回调地址---------------------" + CommonSysConst.getSysConfig().getJjNotifyUrl()); - if (outRechargePrice.getRechargeType() == 1) { + System.out.println("outRechargeOrder-----------------------------------------------------------------------------------------------------------------------------------------------------" + outRechargePrice.getRechargeType()); + if (outRechargeOrder.getRechargeType() == 1) { object.put("is_fast", 1); } JSONObject returnObject = RechargeConfig.rechargeOrderByJj(object); From ef00e327c97cad7cefc2f8189f4f155bffb75265 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 21 Jun 2022 14:29:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/cweb/controller/pay/CzOrderController.java | 3 ++- .../java/com/hai/service/impl/HltUnionCardVipServiceImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java index fabbd8db..841c4ef2 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java @@ -278,7 +278,8 @@ public class CzOrderController { Date rechargeTime = rechargeOrder.getCreateTimed(); Date currentTime = new Date(); - int hours = (int) ((rechargeTime.getTime() - currentTime.getTime()) / (1000 * 60 * 60)); +// 当前时间减去充值时间 + int hours = (int) ((currentTime.getTime() - rechargeTime.getTime()) / (1000 * 60 * 60)); // 判断快充 并且 充值时间小于6 if (rechargeOrder.getRechargeType() == 1 && hours < 6) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java index a3e2f0f5..1a9facf7 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java @@ -199,8 +199,8 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService { HuiLianTongUnionCardConfig.submitSms(phone , "“E信通春节关怀”3张4元话费券、99折加油券已到账,打开“嗨森逛”微信小程序>我的>我的优惠券即可直接使用,到账之日起1月内(30天)有效。"); } else { if (equityLevel == 1) { - HuiLianTongUnionCardConfig.submitSms(phone , "“E信通会员专属”3张4元话费券、2张96折加油券已到账,打开“嗨森逛”微信小程序>我的>我的优惠券即可直接使用,到账之日起1月内(30天)有效。"); - } else if (equityLevel == 2){ + HuiLianTongUnionCardConfig.submitSms(phone , "“E信通会员专属”3张4元话费券、2张99折加油券已到账,打开“嗨森逛”微信小程序>我的>我的优惠券即可直接使用,到账之日起1月内(30天)有效。"); + } else { HuiLianTongUnionCardConfig.submitSms(phone , "“工会卡用户专属”2元话费券、2张96折加油券已到账,打开“嗨森逛”微信小程序>我的>我的优惠券即可直接使用,到账之日起1月内(30天)有效。"); } }