From 7a47dba32af7d81c4fb382a7740f03f7654fa623 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 21 Jul 2021 23:24:48 +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 --- .../main/java/com/cweb/controller/tPigController.java | 3 +-- .../src/main/java/com/hai/config/CommonSysConfig.java | 9 +++++++++ .../src/main/java/com/hai/config/QianZhuConfig.java | 8 +++++--- .../src/main/resources/dev/commonConfig.properties | 3 ++- .../src/main/resources/prod/commonConfig.properties | 4 ++-- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/tPigController.java b/hai-cweb/src/main/java/com/cweb/controller/tPigController.java index c1a11dd9..c6ad0469 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/tPigController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/tPigController.java @@ -89,8 +89,7 @@ public class tPigController { JSONObject data = token.getJSONObject("data"); url = "https://m-test.qianzhu8.com/mobile/?platformId=" + CommonSysConst.getSysConfig().getQinzhuPlatformId() + "&token=" + data.getString("accessToken"); } - - return ResponseMsgUtil.success(token); + return ResponseMsgUtil.success(url); } catch (Exception e) { return ResponseMsgUtil.exception(e); } diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java index 0df74b90..797f1490 100644 --- a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -16,6 +16,7 @@ public class CommonSysConfig { private String tuanYouGasolineAccount; // 汽油账号 private String qinzhuUrl; + private String qinzhuMobileUrl; // 话费充值地址 private String qinzhuPlatformId; private String qinzhuSecret; private String qianzhuOrderNotify; @@ -27,6 +28,14 @@ public class CommonSysConfig { private String telMemberId; private String telUrl; + public String getQinzhuMobileUrl() { + return qinzhuMobileUrl; + } + + public void setQinzhuMobileUrl(String qinzhuMobileUrl) { + this.qinzhuMobileUrl = qinzhuMobileUrl; + } + public String getQianzhuOrderNotify() { return qianzhuOrderNotify; } diff --git a/hai-service/src/main/java/com/hai/config/QianZhuConfig.java b/hai-service/src/main/java/com/hai/config/QianZhuConfig.java index 799fd5bc..497f328a 100644 --- a/hai-service/src/main/java/com/hai/config/QianZhuConfig.java +++ b/hai-service/src/main/java/com/hai/config/QianZhuConfig.java @@ -9,6 +9,7 @@ import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.WxUtils; import com.hai.model.ResponseData; import io.swagger.annotations.ApiOperation; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -44,19 +45,20 @@ public class QianZhuConfig { } public static JSONObject getMobileToken(String platformUniqueId,String nickname,String mobile) throws Exception { - Map contentMap = new HashMap<>(); + Map contentMap = new LinkedHashMap<>(); contentMap.put("platformUniqueId", platformUniqueId); contentMap.put("nickname", nickname); contentMap.put("mobile", mobile); Map map = new HashMap<>(); - map.put("platformId", CommonSysConst.getSysConfig().getQinzhuPlatformId()); + map.put("platformId", "10458"); map.put("action", "users.getTokenV2"); map.put("version", "1.0"); map.put("content", JSON.toJSONString(contentMap)); map.put("traceId", WxUtils.makeNonStr()); map.put("timestamp", new Date().getTime()); - map.put("sign", MD5Util.encode(generateSignature(map,CommonSysConst.getSysConfig().getQinzhuSecret()).getBytes()).toLowerCase()); + map.put("sign", MD5Util.encode(generateSignature(map,"nnl3gg4ss0pka11t").getBytes()).toLowerCase()); + // return HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuMobileUrl()+"/gateway", JSON.toJSONString(map)); return HttpsUtils.doPost("https://live.qianzhu8.com/gateway", JSON.toJSONString(map)); } diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index e874c3ea..452b5436 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -5,9 +5,10 @@ tuanYouDieselAccount=9b115eao4400 tuanYouGasolineAccount=9b115e5g4400 qinzhuUrl=https://live-test.qianzhu8.com +qinzhuMobileUrl=https://live-test.qianzhu8.com qinzhuPlatformId=10376 qinzhuSecret=ktxb49sh2jfhgn8g -qianzhuOrderNotify=https://hsgcs.dctpay.com/crest/qianzhu/orderNotify + wx_cert=/home/project/wx_cert/ diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties index 63ab75ad..a539b557 100644 --- a/hai-service/src/main/resources/prod/commonConfig.properties +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -5,8 +5,8 @@ tuanYouDieselAccount=9b115eao4400 tuanYouGasolineAccount=9b115e5g4400 qinzhuUrl=https://live-test.qianzhu8.com/ -qinzhuPlatformId=10376 -qinzhuSecret=ktxb49sh2jfhgn8g +qinzhuPlatformId=10458 +qinzhuSecret=nnl3gg4ss0pka11t qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify wx_cert=/home/project/wx_cert/