From 507c0299bb0345a080164f78388038704ca2b751 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Tue, 24 Sep 2024 09:54:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bweb/controller/TestController.java | 19 +++++++++++++++++++ .../order/impl/BsOrderRefundServiceImpl.java | 1 + 2 files changed, 20 insertions(+) diff --git a/bweb/src/main/java/com/bweb/controller/TestController.java b/bweb/src/main/java/com/bweb/controller/TestController.java index f75a5e5..db96b0d 100644 --- a/bweb/src/main/java/com/bweb/controller/TestController.java +++ b/bweb/src/main/java/com/bweb/controller/TestController.java @@ -8,6 +8,7 @@ import com.hfkj.config.CommonSysConst; import com.hfkj.model.ResponseData; +import com.hfkj.service.pay.huift.TradeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -17,6 +18,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import java.util.*; @@ -25,7 +27,24 @@ import java.util.*; @Api(value="测试") public class TestController { private static Logger log = LoggerFactory.getLogger(TestController.class); + @Resource + private TradeService huiftTradeService; + @RequestMapping(value="/thirdPayResult",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询V家园订单交易状态") + public ResponseData thirdPayResult(@RequestParam(value = "preOrderNo" , required = true) String preOrderNo, + @RequestParam(value = "shopCode" , required = true) String shopCode, + @RequestParam(value = "signSecret" , required = true) String signSecret) { + try { + + return ResponseMsgUtil.success(huiftTradeService.thirdPayResult(preOrderNo,shopCode,signSecret)); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } @RequestMapping(value="/haiOilLogin",method = RequestMethod.POST) @ResponseBody diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java index f863f41..bb9237f 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java @@ -219,6 +219,7 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService { // 资金退款 orderRefund.setRefundStatus(refundMoney(orderRefund)?OrderRefundStatusEnum.status2.getCode():OrderRefundStatusEnum.status3.getCode()); + orderRefund.setFinishTime(orderRefund.getRefundStatus().equals(OrderRefundStatusEnum.status2.getCode())?new Date():null); editData(orderRefund); // 退款成功