|
@@ -1,27 +1,31 @@
|
|
|
package restcontroller.webmanage.sale.contracttask;
|
|
package restcontroller.webmanage.sale.contracttask;
|
|
|
|
|
|
|
|
|
|
+import beans.parameter.Parameter;
|
|
|
|
|
+import common.YosException;
|
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 基础配置,调用API之前必须填充的参数
|
|
* 基础配置,调用API之前必须填充的参数
|
|
|
*/
|
|
*/
|
|
|
public class WeChatConfig {
|
|
public class WeChatConfig {
|
|
|
|
|
+
|
|
|
|
|
+ private static String param(String key) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ return Parameter.getString(key);
|
|
|
|
|
+ } catch (YosException e) {
|
|
|
|
|
+ throw new RuntimeException("读取系统参数失败: " + key, e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// SecretId SecretKey 调用云API需要使用的密钥对,是平台企业的密钥对(子客企业无需准备此参数)。
|
|
// SecretId SecretKey 调用云API需要使用的密钥对,是平台企业的密钥对(子客企业无需准备此参数)。
|
|
|
// 联调/生产环境都是可以由平台企业电子签控制台应用集成模块自主获取。
|
|
// 联调/生产环境都是可以由平台企业电子签控制台应用集成模块自主获取。
|
|
|
- //测试
|
|
|
|
|
-// public static final String SecretId = "AKyD3g9UUckpm7xfldUESaMt9uTigZZ4ym";
|
|
|
|
|
-// public static final String SecretKey = "SKLNHCCdOwpGEyobK19Vnntwh5DtnKA6ak";
|
|
|
|
|
|
|
+ public static final String SecretId = param("TE_SecretId");
|
|
|
|
|
|
|
|
- //正式
|
|
|
|
|
- public static final String SecretId = "AKIDZr0ymPs9E63tZ3NXcVBgy5ziHhw1udAR";
|
|
|
|
|
- public static final String SecretKey = "A9vjUcdBlDbw9C4rUvNjW8Zv6D9ayHPL";
|
|
|
|
|
|
|
+ public static final String SecretKey = param("TE_SecretKey");
|
|
|
|
|
|
|
|
// 应用的唯一标识,对应通用参数AppId。不同的业务系统可以采用不同的AppId,
|
|
// 应用的唯一标识,对应通用参数AppId。不同的业务系统可以采用不同的AppId,
|
|
|
// 不同AppId下的数据是隔离的。联调/生产环境都是可以由控制台开发者中心-应用集成自主生成。
|
|
// 不同AppId下的数据是隔离的。联调/生产环境都是可以由控制台开发者中心-应用集成自主生成。
|
|
|
- //测试
|
|
|
|
|
-// public static final String AppId = "yD3g9UUckpm7fg9aUE66BdtzqsVl3kQL";
|
|
|
|
|
- //正式
|
|
|
|
|
- public static final String AppId = "yD3PxUU1mewvnwUx3tsXdxP7ndvLPevd";
|
|
|
|
|
|
|
+ public static final String AppId = param("TE_AppId");
|
|
|
|
|
|
|
|
// 非必需
|
|
// 非必需
|
|
|
// 在子客企业开通电子签后,会生成唯一的子客应用Id(ProxyAppId)用于代理调用时的鉴权
|
|
// 在子客企业开通电子签后,会生成唯一的子客应用Id(ProxyAppId)用于代理调用时的鉴权
|
|
@@ -34,7 +38,7 @@ public class WeChatConfig {
|
|
|
//(比如,可以使用企业名称的hash值,或者社会统一信用代码的hash值,或者随机hash值,需要平台企业保存)
|
|
//(比如,可以使用企业名称的hash值,或者社会统一信用代码的hash值,或者随机hash值,需要平台企业保存)
|
|
|
// 最大64位字符串
|
|
// 最大64位字符串
|
|
|
// 固定为DigestUtils.sha256Hex("浙江美大实业股份有限公司");
|
|
// 固定为DigestUtils.sha256Hex("浙江美大实业股份有限公司");
|
|
|
- public static final String ProxyOrganizationName = "浙江美大节能电器销售有限公司";
|
|
|
|
|
|
|
+ public static final String ProxyOrganizationName = param("TE_ProxyOrganizationName");
|
|
|
public static final String ProxyOrganizationOpenId = DigestUtils.sha256Hex(ProxyOrganizationName);
|
|
public static final String ProxyOrganizationOpenId = DigestUtils.sha256Hex(ProxyOrganizationName);
|
|
|
|
|
|
|
|
// public static final String ProxyOrganizationName = "嘉兴市云链信息技术有限公司测试";
|
|
// public static final String ProxyOrganizationName = "嘉兴市云链信息技术有限公司测试";
|
|
@@ -47,10 +51,10 @@ public class WeChatConfig {
|
|
|
// (比如,可以使用经办人企业名+员工身份证的hash值,需要平台企业保存)
|
|
// (比如,可以使用经办人企业名+员工身份证的hash值,需要平台企业保存)
|
|
|
// 最大64位字符串
|
|
// 最大64位字符串
|
|
|
//固定为DigestUtils.sha256Hex("吴志根15669363739"); 超级管理员的openid
|
|
//固定为DigestUtils.sha256Hex("吴志根15669363739"); 超级管理员的openid
|
|
|
- public static final String SuperProxyOperatorOpenId = DigestUtils.sha256Hex(ProxyOrganizationName + "吴志根" + "15669363739");
|
|
|
|
|
|
|
+ public static final String SuperProxyOperatorOpenId = param("TE_SuperProxyOperatorOpenId");
|
|
|
|
|
|
|
|
//经办人
|
|
//经办人
|
|
|
- public static final String organizationOpenId = DigestUtils.sha256Hex(ProxyOrganizationName + "顾曙佳" + "13511382195");
|
|
|
|
|
|
|
+ public static final String organizationOpenId = param("TE_ProxyOperatorOpenId");
|
|
|
|
|
|
|
|
// ServerSignSealId 企业方静默签用的印章Id,电子签控制台印章模块获取
|
|
// ServerSignSealId 企业方静默签用的印章Id,电子签控制台印章模块获取
|
|
|
public static String ServerSignSealId = "****************";
|
|
public static String ServerSignSealId = "****************";
|
|
@@ -59,11 +63,11 @@ public class WeChatConfig {
|
|
|
public static String ServerSignOrgName = "****************";
|
|
public static String ServerSignOrgName = "****************";
|
|
|
|
|
|
|
|
// EndPoint API域名,现网使用 essbasic.tencentcloudapi.com
|
|
// EndPoint API域名,现网使用 essbasic.tencentcloudapi.com
|
|
|
- public static String EndPoint = "essbasic.tencentcloudapi.com";
|
|
|
|
|
|
|
+ public static String EndPoint = param("TE_EndPoint");
|
|
|
|
|
|
|
|
// FileServiceEndPoint 文件服务域名,现网使用 file.ess.tencent.cn
|
|
// FileServiceEndPoint 文件服务域名,现网使用 file.ess.tencent.cn
|
|
|
// UploadFiles 接口使用此域名进行调用
|
|
// UploadFiles 接口使用此域名进行调用
|
|
|
- public static String FileServiceEndPoint = "file.ess.tencent.cn";
|
|
|
|
|
|
|
+ public static String FileServiceEndPoint = param("TE_FileServiceEndPoint");
|
|
|
|
|
|
|
|
// TemplateId 模板ID,电子签控制台模板模块获取,仅在通过模板发起时使用
|
|
// TemplateId 模板ID,电子签控制台模板模块获取,仅在通过模板发起时使用
|
|
|
public static final String TemplateId = "****************";
|
|
public static final String TemplateId = "****************";
|