From 9f1a566193405154cf579fbf44637fdd0050ee97 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 29 May 2023 18:11:45 +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/api/controller/v1/MerController.java | 7 ++++--- .../com/hfkj/channel/lakala/LaKaLaConfigService.java | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/open-api/src/main/java/com/api/controller/v1/MerController.java b/open-api/src/main/java/com/api/controller/v1/MerController.java index 997b64b..e0ea944 100644 --- a/open-api/src/main/java/com/api/controller/v1/MerController.java +++ b/open-api/src/main/java/com/api/controller/v1/MerController.java @@ -35,11 +35,12 @@ public class MerController { @ApiOperation(value = "wechatParamConf") public ResponseData wechatParamConf(@RequestParam(value = "merCupNo" , required = true) String merCupNo, @RequestParam(value = "subMchId" , required = true) String subMchId, - @RequestParam(value = "subAppid" , required = true) String subAppid, - @RequestParam(value = "jsapiPath" , required = true) String jsapiPath) { + @RequestParam(value = "subAppid" , required = false) String subAppid, + @RequestParam(value = "jsapiPath" , required = false) String jsapiPath, + @RequestParam(value = "confType" , required = true) String confType) { try { // return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf("822690053111ERC", "569999133","wxf30043187dc90829", "http://api2.ctpark.cn/")); - return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf(merCupNo, subMchId,subAppid, jsapiPath)); + return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf(merCupNo, subMchId,subAppid, jsapiPath,confType)); } catch (Exception e) { log.error(e.getMessage(), e); diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java index e7a47ab..ee84fef 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java @@ -36,9 +36,10 @@ public class LaKaLaConfigService { * @param subMchId 微信子商户号 * @param subAppid 关联APPID 绑定特约商户或渠道公众号、小程序、APP支付等对应的APPID * @param jsapiPath 授权目录 + * @param confType 配置类型 配置类型 类型=SUB_APPID时,subAppid必传, 类型=SUBSCRIBE_APPID时,subscribeAppid必传 ,类型=UNION时,subAppid和subscribeAppid必传 类型=JSAPI_PATH时,jsapiPath必传 * @return */ - public JSONObject wechatParamConf(String merCupNo,String subMchId,String subAppid,String jsapiPath) { + public JSONObject wechatParamConf(String merCupNo,String subMchId,String subAppid,String jsapiPath,String confType) { // 请求参数 Map param = new HashMap<>(); param.put("timestamp", new Date().getTime()); @@ -48,12 +49,12 @@ public class LaKaLaConfigService { Map map = new HashMap<>(); map.put("merCupNo", merCupNo); - map.put("channlId", "24006513"); // 微信渠道号 (仅支持拉卡拉渠道配置) - // map.put("channlId", "167048649"); // 微信渠道号 (仅支持拉卡拉渠道配置) + // map.put("channlId", "24006513"); // 微信渠道号 (仅支持拉卡拉渠道配置) + map.put("channlId", "167048649"); // 微信渠道号 (仅支持拉卡拉渠道配置) map.put("subMchId", subMchId); map.put("subAppid", subAppid); map.put("jsapiPath", jsapiPath); - map.put("confType", "SUB_APPID"); + map.put("confType", confType); param.put("reqData", map); // 生成签名