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); // 退款成功