From 6f136f5607b67b570fd26d3347984da684673309 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Tue, 31 Dec 2024 11:49:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=BA=95=E9=98=BF=E5=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cweb/src/main/java/com/cweb/controller/CommonController.java | 4 +++- .../java/com/order/controller/notify/CqNotifyController.java | 3 ++- .../com/hfkj/service/hlt/HuiLianTongUnionCardService.java | 5 +---- .../java/com/hfkj/sysenum/order/OrderCouponNoStatusEnum.java | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cweb/src/main/java/com/cweb/controller/CommonController.java b/cweb/src/main/java/com/cweb/controller/CommonController.java index 542e8f7..d3521b7 100644 --- a/cweb/src/main/java/com/cweb/controller/CommonController.java +++ b/cweb/src/main/java/com/cweb/controller/CommonController.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.RedisUtil; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsOrderGoods; @@ -66,7 +67,8 @@ public class CommonController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumptionResult.getString("message")); } */ - JSONObject refundObj = HuiLianTongUnionCardService.refund("R241202115359997", "241130223414212711"); + String refundOrderNo = "R" + DateUtil.date2String(new Date(), DateUtil.YMDHMS); + JSONObject refundObj = HuiLianTongUnionCardService.refund(refundOrderNo, "241227092905479836"); if (!refundObj.getString("respCode").equals("0000")) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refundObj.getString("respMessage")); } diff --git a/order/src/main/java/com/order/controller/notify/CqNotifyController.java b/order/src/main/java/com/order/controller/notify/CqNotifyController.java index 5b8b0b6..61bd164 100644 --- a/order/src/main/java/com/order/controller/notify/CqNotifyController.java +++ b/order/src/main/java/com/order/controller/notify/CqNotifyController.java @@ -9,6 +9,7 @@ import com.hfkj.entity.BsOrderCoupon; import com.hfkj.entity.BsOrderCouponNo; import com.hfkj.service.coupon.BsOrderCouponNoService; import com.hfkj.service.coupon.channel.ChongQingCNPCCouponService; +import com.hfkj.sysenum.order.OrderCouponNoStatusEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -52,7 +53,7 @@ public class CqNotifyController { BsOrderCouponNo coupon = orderCouponNoService.getDetailByCouNo(body.getString("couponNo")); if (coupon != null) { coupon.setFinishTime(DateUtil.format(body.getString("useTime"), "yyyyMMddHHmmss")); - coupon.setStatus(40); + coupon.setStatus(OrderCouponNoStatusEnum.status3.getCode()); orderCouponNoService.editData(coupon); } diff --git a/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java b/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java index 256b522..e2b6d02 100644 --- a/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java +++ b/service/src/main/java/com/hfkj/service/hlt/HuiLianTongUnionCardService.java @@ -263,10 +263,7 @@ public class HuiLianTongUnionCardService { public static void main(String[] args) { // {"respMessage":"ok","data":"Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu","sign":"47186141FD8B3FB6CCB590F58321D9C6","respCode":"0000","responseId":"1669202185936"} - String data = "Gbkl57c3fEBg+E3HfPuQ55SDLVyAf2Ys3VN1cifAfXIoT1gnbFR0NaiH/z1OIZZiuqlFwDLLu6n4\n" + - "VBkM8fF5jVEekFNLY57NgRfRr4BghKXdIr8hdPJnbfOO0VtjITPrrZWwMDwfYzJulYhBsNGCubov\n" + - "9ruAA0DN0ESoH765nvlH0lI/wdIOvRE7GyTfQzzT68i5p+Qf/k7yjQk22l4KUfuUVM+jMeW95xkd\n" + - "+gVJvWctjBC0DN3zi3CwsVgQwVmj".replace("\\n", ""); + String data = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDwYfnUdBVz6Kj4HS2oCA1TTiqJkCUIYa5M\\n0DolwI0hl/U9NjehIajUMe64vH0PKpI1unzlti6JHq4/oosfPQ2lZVTKIzmRUpEIJz5eUldEn7PO\\nqPXMaPa2paLHY8bLUjlMX6HWbBULM4rXikZhIGa4iRp4RUprEFQ=".replace("\\n", ""); String decodeData = DesUtil.decode(HLT_CARD_SIGN_CODE, data, Charset.forName("UTF-8")); System.out.println(JSONObject.parseObject(decodeData)); diff --git a/service/src/main/java/com/hfkj/sysenum/order/OrderCouponNoStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/order/OrderCouponNoStatusEnum.java index da779e1..a5936ca 100644 --- a/service/src/main/java/com/hfkj/sysenum/order/OrderCouponNoStatusEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/order/OrderCouponNoStatusEnum.java @@ -31,6 +31,10 @@ public enum OrderCouponNoStatusEnum { * 已退款 */ status4(4, "已过期"), + /** + * 已退款 + */ + status5(5, "已退款"), ; private final int code;