diff --git a/cweb/src/main/java/com/cweb/controller/BsStoreDiscountActivityPartakeUserController.java b/cweb/src/main/java/com/cweb/controller/BsStoreDiscountActivityPartakeUserController.java index d00c253..6888c35 100644 --- a/cweb/src/main/java/com/cweb/controller/BsStoreDiscountActivityPartakeUserController.java +++ b/cweb/src/main/java/com/cweb/controller/BsStoreDiscountActivityPartakeUserController.java @@ -65,20 +65,19 @@ public class BsStoreDiscountActivityPartakeUserController { @RequestParam(value = "type" , required = true) Integer type, @RequestParam(value = "systemType" , required = true) Integer systemType) { try { - - BsTradeOrder tradeNo = tradeOrderService.getOrderByOutTradeNoOrPlatformTradeNo(outTradeNo); - if (tradeNo == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的订单"); - } - System.out.println("outTradeNo="+tradeNo.getOutTradeNo()+"&qrCodeSn="+"&type="+type+"&systemType="+systemType); + System.out.println("outTradeNo="+outTradeNo+"&qrCodeSn="+"&type="+type+"&systemType="+systemType); JSONObject response = HttpsUtils.doGet(CommonSysConst.getSysConfig().getHsg_domain_name() + "/v1/wxMsg/getWxToken"); if (StringUtils.isBlank(response.getString("return_data"))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取token失败"); } + BsTradeOrder tradeNo = tradeOrderService.getOrderByOutTradeNoOrPlatformTradeNo(outTradeNo); + if (tradeNo == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的订单"); + } + String param = tradeNo.getOutTradeNo(); + String fileUrl = "/share/" + System.currentTimeMillis() + ".png"; - String param = outTradeNo; - String fileUrl = "/share/" + System.currentTimeMillis() + ".png"; // type 生成类型 // 1:支付交易成功后 // 2:分享关注公众号 diff --git a/service/src/main/java/com/hfkj/service/BsTradeOrderService.java b/service/src/main/java/com/hfkj/service/BsTradeOrderService.java index 3d3e241..afc507e 100644 --- a/service/src/main/java/com/hfkj/service/BsTradeOrderService.java +++ b/service/src/main/java/com/hfkj/service/BsTradeOrderService.java @@ -48,8 +48,12 @@ public interface BsTradeOrderService { */ BsTradeOrder getOrderByOutTradeNo(String tradeNo); + /** + * 查询交易订单 + * @param tradeNo 交易流水或渠道平台交易流水 + * @return + */ BsTradeOrder getOrderByOutTradeNoOrPlatformTradeNo(String tradeNo); - /** * 根据交易订单id,查询 * @param tradeOrderId