sysParam 获取值问题
This commit is contained in:
@@ -28,8 +28,6 @@ public class AppWxServiceImpl extends BaseWx {
|
||||
@DubboReference
|
||||
private SysParamsService paramsService;
|
||||
|
||||
private static final Set<String> USER_MINI_KEYS = Set.of(ParamCodeCst.Wechat.Mini.USER_WX_APP_ID, ParamCodeCst.Wechat.Mini.USER_WX_SECRETE);
|
||||
|
||||
public AppWxServiceImpl(@Autowired RedisService autoRedisService) {
|
||||
this.redisService = autoRedisService;
|
||||
config = new Config();
|
||||
@@ -64,10 +62,10 @@ public class AppWxServiceImpl extends BaseWx {
|
||||
@Override
|
||||
public void init() throws CzgException {
|
||||
// 用户小程序参数
|
||||
Map<String, String> userMiniKeyMap = paramsService.getParamsByMap("userMiniKeys", USER_MINI_KEYS);
|
||||
Map<String, String> userMiniKeyMap = paramsService.getParamsByMap("user_mini_key_set", ParamCodeCst.USER_MINI_KEY_SET);
|
||||
|
||||
// 微信支付参数
|
||||
Map<String, String> payKeyMap = paramsService.getParamsByMap("payKeys", PAY_KEYS);
|
||||
Map<String, String> payKeyMap = paramsService.getParamsByMap("pay_key_set", ParamCodeCst.PAY_KEY_SET);
|
||||
|
||||
// 小程序id
|
||||
config.appId = userMiniKeyMap.get(ParamCodeCst.Wechat.Mini.USER_WX_APP_ID);
|
||||
|
||||
@@ -59,18 +59,6 @@ public abstract class BaseWx {
|
||||
*/
|
||||
protected static final Long EXPIRES_OFFSET = 200L;
|
||||
|
||||
/**
|
||||
* 支付参数KEY
|
||||
*/
|
||||
protected static final Set<String> PAY_KEYS = Set.of(
|
||||
ParamCodeCst.Wechat.Pay.WX_PUB_KEY,
|
||||
ParamCodeCst.Wechat.Pay.WX_API_CLIENT_KEY,
|
||||
ParamCodeCst.Wechat.Pay.WX_API_CLIENT_CERT,
|
||||
ParamCodeCst.Wechat.Pay.WX_MCH_ID,
|
||||
ParamCodeCst.Wechat.Pay.WX_V3_KEY,
|
||||
ParamCodeCst.System.NATIVE_NOTIFY_URL
|
||||
);
|
||||
|
||||
/**
|
||||
* 初始化配置信息
|
||||
*/
|
||||
|
||||
@@ -64,7 +64,7 @@ public class WxServiceImpl extends BaseWx {
|
||||
@Override
|
||||
public void init() {
|
||||
// 商户小程序参数
|
||||
Map<String, String> shopMiniKeyMap = paramsService.getParamsByMap("shopMiniKeys", shopMiniKeys);
|
||||
Map<String, String> shopMiniKeyMap = paramsService.getParamsByMap("shop_mini_key_set", ParamCodeCst.SHOP_MINI_KEY_SET);
|
||||
|
||||
// 小程序id
|
||||
config.appId = shopMiniKeyMap.get(ParamCodeCst.Wechat.Mini.SHOP_WX_APP_ID);
|
||||
@@ -72,7 +72,7 @@ public class WxServiceImpl extends BaseWx {
|
||||
config.appSecret = shopMiniKeyMap.get(ParamCodeCst.Wechat.Mini.SHOP_WX_SECRETE);
|
||||
|
||||
// 微信支付参数
|
||||
Map<String, String> payKeyMap = paramsService.getParamsByMap("payKeys", PAY_KEYS);
|
||||
Map<String, String> payKeyMap = paramsService.getParamsByMap("pay_key_set", ParamCodeCst.PAY_KEY_SET);
|
||||
config.certPath = "";
|
||||
// 微信支付公钥
|
||||
config.pubKey = payKeyMap.get(ParamCodeCst.Wechat.Pay.WX_PUB_KEY);
|
||||
|
||||
Reference in New Issue
Block a user