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 e0ea944..6d6719d 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 @@ -34,13 +34,14 @@ public class MerController { @ResponseBody @ApiOperation(value = "wechatParamConf") public ResponseData wechatParamConf(@RequestParam(value = "merCupNo" , required = true) String merCupNo, + @RequestParam(value = "channlId" , required = true) String channlId, @RequestParam(value = "subMchId" , required = true) String subMchId, @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,confType)); + return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf(merCupNo, channlId, subMchId,subAppid, jsapiPath,confType)); } catch (Exception e) { log.error(e.getMessage(), e); @@ -51,10 +52,11 @@ public class MerController { @RequestMapping(value="/querySubMerInfo",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "querySubMerInfo") - public ResponseData querySubMerInfo(@RequestParam(value = "merCupNo" , required = true) String merCupNo) { + public ResponseData querySubMerInfo(@RequestParam(value = "channlId" , required = true) String channlId, + @RequestParam(value = "merCupNo" , required = true) String merCupNo) { try { - return ResponseMsgUtil.success(laKaLaConfigService.querySubMerInfo(merCupNo)); + return ResponseMsgUtil.success(laKaLaConfigService.querySubMerInfo(channlId,merCupNo)); } catch (Exception e) { log.error(e.getMessage(), e); diff --git a/open-api/src/main/resources/prod-9606/application.yml b/open-api/src/main/resources/prod-9606/application.yml new file mode 100644 index 0000000..c665fba --- /dev/null +++ b/open-api/src/main/resources/prod-9606/application.yml @@ -0,0 +1,95 @@ +server: + port: 9606 + servlet: + context-path: /openApi + +#配置是否为debug模式,debug模式下,不开启权限校验 +debug: false + +#datasource数据源设置 +spring: + datasource: + url: jdbc:mysql://192.168.0.63:21100/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: gratia_pay + password: HUfukeji123456!@# + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 10 + initialSize: 5 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + + redis: + database: 2 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 + #配置日期返回至前台为时间戳 + jackson: + serialization: + write-dates-as-timestamps: true + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://140.210.192.36:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: abcd123! + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + database: 2 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + +mybatis: + mapperLocations: + - classpath*:sqlmap*/*.xml + type-aliases-package: + org.springboot.sample.entity + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/open-api/src/main/resources/prod-9606/config.properties b/open-api/src/main/resources/prod-9606/config.properties new file mode 100644 index 0000000..185a8ae --- /dev/null +++ b/open-api/src/main/resources/prod-9606/config.properties @@ -0,0 +1,11 @@ +fileUrl=/home/project/gratia-pay/filesystem +cmsPath=/home/project/gratia-pay/filesystem/cmsPath + +wxAppId=wxa075e8509802f826 +wxAppSecret=0e606fc1378d35e359fcf3f15570b2c5 + +// WeChat service provider +wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder +wxMchAppId=wx637bd6f7314daa46 +wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5 +wxMchId=1289663601 diff --git a/open-api/src/main/resources/prod-9606/logback.xml b/open-api/src/main/resources/prod-9606/logback.xml new file mode 100644 index 0000000..3d88a9d --- /dev/null +++ b/open-api/src/main/resources/prod-9606/logback.xml @@ -0,0 +1,178 @@ + + + + + %d %p (%file:%line\)- %m%n + UTF-8 + + + + log/base.log + + log/base.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/dao.log + + log/dao.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/error.log + + log/error.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + + + + + + + + + log/alipay/alipaylog.log + + log/alipay.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + log/hsg.log + + log/hsg/hsg.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + log/requestV1.log + + log/requestV1/requestV1.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + log/laklalog.log + + log/laklalog/laklalog.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + log/lklTradeNotify.log + + log/lklTradeNotify/lklTradeNotify.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + 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 d86209d..7b666d2 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java @@ -29,7 +29,7 @@ public class LaKaLaConfigService { * @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,String confType) { + public JSONObject wechatParamConf(String merCupNo,String channlId,String subMchId,String subAppid,String jsapiPath,String confType) { // 请求参数 Map param = new HashMap<>(); param.put("timestamp", new Date().getTime()); @@ -39,8 +39,7 @@ public class LaKaLaConfigService { Map map = new HashMap<>(); map.put("merCupNo", merCupNo); - // map.put("channlId", "24006513"); // 微信渠道号 (仅支持拉卡拉渠道配置) - map.put("channlId", "167048649"); // 微信渠道号 (仅支持拉卡拉渠道配置) + map.put("channlId", channlId); // 微信渠道号 (仅支持拉卡拉渠道配置) map.put("subMchId", subMchId); map.put("subAppid", subAppid); map.put("jsapiPath", jsapiPath); @@ -70,7 +69,7 @@ public class LaKaLaConfigService { * @param merCupNo * @return */ - public JSONObject querySubMerInfo(String merCupNo) { + public JSONObject querySubMerInfo(String channlId,String merCupNo) { // 请求参数 Map param = new HashMap<>(); param.put("timestamp", new Date().getTime()); @@ -81,7 +80,7 @@ public class LaKaLaConfigService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", new Date().getTime()); - map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); + map.put("orgCode", channlId); map.put("merCupNo", merCupNo); map.put("registerStatus", "SUCCESS"); param.put("reqData", map); diff --git a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java index f4d66ea..f5c28f9 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java +++ b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java @@ -82,10 +82,16 @@ public class SignatureUtil { public static void main(String[] args) throws Exception { String paramStr = "{\n" + - " \"merchantNo\": \"2023030909414450700\",\n" + - " \"outSeparateNo\": \"1530202304261720503943170005\"" + + " \"merchantNo\": \"2023053014484290706\",\n" + + " \"outTradeNo\": \"ZF1130202305051459532538971005\",\n" + + " \"payMode\": \"WECHAT\",\n" + + " \"totalAmount\": 0.01,\n" + + " \"transType\": \"JSAPI\",\n" + + " \"subAppid\":\"wxc1d482cb439d570d\",\n" + + " \"userId\": \"o4Jwb42CBpXgAZJaF985MViTBIaI\",\n" + + " \"profitSharing\": 0\n" + "}"; - String sign = createSign(JSONObject.parseObject(paramStr), "LRL9uflTQGeyp9yVWDD6orhBp2VhYDvP"); + String sign = createSign(JSONObject.parseObject(paramStr), "2sKRbwGqRoejsqn9HFJL9p5T0GqDOONp"); System.out.println(sign); } } diff --git a/service/src/main/resources/prod-9606/commonConfig.properties b/service/src/main/resources/prod-9606/commonConfig.properties new file mode 100644 index 0000000..e8089ca --- /dev/null +++ b/service/src/main/resources/prod-9606/commonConfig.properties @@ -0,0 +1,40 @@ +obs_bucket_name=gratia-pay +obs_end_point=https://obs.cn-southwest-2.myhuaweicloud.com +obs_url=https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com + +qr_code_data_url=https://pay.dctpay.com/scanPay +qr_code_url=https://pay.dctpay.com/filesystem/payQrCode/ + +lkl_request_url=https://s2.lakala.com +lkl_org_code=965644 +lkl_v3_appid=OP00000622 +lkl_v3_serial_no=01752b7386f8 +lkl_v3_private_key=/home/project/gratia-pay/cert/lakala/v3/prod_private.text + +lkl_v2_appid=OP00000622 +lkl_v2_serial_no=01752b7386f8 +lkl_v2_private_key=/home/project/gratia-pay/cert/lakala/v2/prod_private.text +lkl_mer_contract_ret_url=https://pay.dctpay.com/brest/laKaLaNotify/merContract +lkl_micro_pay_ret_url=https://pay.dctpay.com/crest/laKaLaNotify/microPay +lkl_open_api_pay_notify_url=https://pay.dctpay.com/openApi/v1/payNotify/lakala + +lkl_saas_client_id=huifu +lkl_saas_client_secret=f65VVjqJfLtc177F +lkl_saas_activity_id=12 +lkl_saas_user_no=22206482 +lkl_saas_request_url=https://tkapi.lakala.com/ +lkl_saas_request_mer_registration_token_url=https://tkapi.lakala.com/auth/oauth/token +lkl_saas_request_mer_registration_url=https://htkactvi.lakala.com/registration/merchant/ +lkl_saas_request_mer_update_url=https://htkapi.lakala.com/api/ +lkl_saas_request_mer_registration_common_url=https://htkactvi.lakala.com/registration/ +lkl_saas_request_mer_url=https://tkapi.lakala.com/htkmerchants/ +lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAUkzRA+4GOS5OzYqxD/UJwM6p9to1dPvetL/7RbMa93o46qToPlPtaW61EvblOldHcBEHo7AGXXKmIYr7t2Up1PZC0g7UMpno/b5WkT6ieJ601Xreuj8hhyf2/xoej5vpi4/+lAr9YF+5GcyaVf4gfzTNJrmKj9PfvX5B3rUH2QIDAQAB +lkl_saas_private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMBSTNED7gY5Lk7NirEP9QnAzqn22jV0+960v/tFsxr3ejjqpOg+U+1pbrUS9uU6V0dwEQejsAZdcqYhivu3ZSnU9kLSDtQymej9vlaRPqJ4nrTVet66PyGHJ/b/Gh6Pm+mLj/6UCv1gX7kZzJpV/iB/NM0muYqP09+9fkHetQfZAgMBAAECgYB42D3kaC+8QVnTsluffoNeKYSyT6Y1SNiqy7CGVvl/zFlEQkx0khVybHlf1hbFWq9U+Bn7TuNgXH+Z3CHUoRwy4Ap/kMx637iRatoC8F/kcPaiB7JFQfdrxhgK858dSyHCQ2OXXQDJgJdth+oF9FylVsrDu5Sw3ha4OuzrmufuwQJBAPnPPSeFr1wu7kH6I+A5E49fMbAm7EU+3TYVzxNH1lr3X/LWuK9pi/LVPrSR4eNgAypyQWREIqdpBIiJ9bOnwa0CQQDFFl0zTQTVTWf5r/hwgCUMo4gHr2y/q7XMNe6n5fh4SQuQ+o4gW+BGHzDrT97G5hFGPL+w5niGuEBHWSo5/9xdAkEAnrxdM7vzDjSUGUCFg3lBQJ1QyYoyIF4t2qxJBQtk3jDKu1hNysjasNdoHP2F+CGOYW5wtvHEw3Qr+UcQ5bP3kQJABPAcga6KUnXQBxd7mAX956UpQVgJ13uL4IPxaM+APDNIUOeWLAVhRyB870hfAoi9Ig9fliUQG//9zEvVnQJmGQJBAOb8Z0mGMEbEeAyEKjqoNiQkkIcoBdmPKNFUoUJ6ohcBNOoMfklvNsf2+BPfuhs26tvhYDBRgCAfOVhqTQcGj6I= + +wechat_pay_notify_url=https://pay.dctpay.com/crest/weiXinNotify/jsapiPay + +file_url=/home/project/gratia-pay/file +filesystem=/home/project/gratia-pay/filesystem + +domainName=https://pay.dctpay.com +hsg_domain_name=https://hsg.dctpay.com/