From 8215f68730ec0419f36b98d5156a505cbe814d56 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 7 Feb 2023 14:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A42=E3=80=820=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/HighThirdPartyController.java | 3 +- .../java/com/hai/config/RechargeConfig.java | 28 +++++++++++++++++++ .../com/hai/config/ThirdProductConfig.java | 10 +++++-- .../impl/OrderCreateHandleServiceImpl.java | 2 +- .../service/impl/HighOrderServiceImpl.java | 2 +- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java b/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java index 0d6f2804..41b919f0 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java @@ -304,10 +304,11 @@ public class HighThirdPartyController { @RequestParam(name = "productType", required = true) Integer productType, @RequestParam(name = "productId", required = false) Long productId, @RequestParam(name = "orderNo", required = false) String orderNo, + @RequestParam(name = "payType", required = false) String payType, @RequestParam(name = "companyId", required = true) Long companyId) { try { - return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , companyId , productId , orderNo)); + return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , companyId , productId , orderNo , payType)); } catch (Exception e) { log.error("HighUserCardController --> oilCardRefund() error!", e); 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 b239a588..e1f0602e 100644 --- a/hai-service/src/main/java/com/hai/config/RechargeConfig.java +++ b/hai-service/src/main/java/com/hai/config/RechargeConfig.java @@ -203,4 +203,32 @@ public class RechargeConfig { } + /** + * @Author Sum1Dream + * @Name searchProductByHg + * @Description // 嗨购话费产品查询 + * @Date 11:39 2023/2/7 + * @Param [object] + * @Return com.alibaba.fastjson.JSONObject + */ + public static JSONObject searchProductByHg(JSONObject object) throws Exception { + Map paramMap = new HashMap<>(); + + paramMap.put("agentOrderId" , object.getString("agentOrderId")); + paramMap.put("productId" , object.getInteger("productId")); + paramMap.put("mobile" , object.getString("mobile")); + paramMap.put("timestamp" , DateUtil.date2String(new Date() , DateUtil.Y_M_D_HMS)); + paramMap.put("appid" , CommonSysConst.getSysConfig().getCyApiKey()); + paramMap.put("sign", WxUtils.generateSignatureCy(paramMap , CommonSysConst.getSysConfig().getCyAppSecret() , WXPayConstants.SignType.MD5)); + + log.info("============请求任务Start============="); + log.info("城宇话费下单-请求参数: " + JSON.toJSONString(paramMap)); + + JSONObject jsonObject = HttpsUtils.doPostByCy(CommonSysConst.getSysConfig().getCyPostUrl()+ "/api/interface/recharge", paramMap); + + log.info("城宇话费下单-响应参数: " + jsonObject.toJSONString()); + log.info("============请求任务End=============="); + return jsonObject; + } + } diff --git a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java index ee304935..d801ef6c 100644 --- a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java +++ b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java @@ -67,7 +67,7 @@ public class ThirdProductConfig { return null; } - public JSONObject getThirdPartyByDetail(Integer platformId , Integer productType , Long companyId , Long productId , String orderNo) { + public JSONObject getThirdPartyByDetail(Integer platformId , Integer productType , Long companyId , Long productId , String orderNo , String payType) { BsProductConfig productConfig = getProductConfig(productType, companyId , productId); if (productConfig == null && productType != 9) { @@ -98,7 +98,13 @@ public class ThirdProductConfig { object.put("priceDiscount" , productConfig.getDiscount()); } - object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap)); + if (payType != null && payType.length() != 0) { + object.put("productPayType" , payType); + } else { + object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap)); + } + + object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap)); return object; diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index 1300f893..0356baa2 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -615,7 +615,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { String orderNo; // 查询详单订单的实际 - JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null); + JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null , ""); // 获取token 千猪请求接口token JSONObject userToken = QianZhuConfig.getTokenV2(user.getId().toString(), user.getName(), user.getPhone()); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 9e1bc437..e2d71550 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -1426,7 +1426,7 @@ public class HighOrderServiceImpl implements HighOrderService { BigDecimal marketPrice = new BigDecimal(0); // 查询详单订单的实际 - JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null); + JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null , ""); highOrder.setProductType(object.getInteger("productType"));