支付宝和微信工具类参数从sysParam取出

This commit is contained in:
张松
2025-03-10 10:55:58 +08:00
parent 547f2b046b
commit 406bad4f2e

View File

@@ -45,7 +45,7 @@ public class SmsUtil {
private String templateCode; private String templateCode;
@PostConstruct @PostConstruct
public SysParamsService init() { public void init() {
sysParamsService = remoteSysParamsService == null ? applicationContext.getBean(SysParamsService.class): remoteSysParamsService; sysParamsService = remoteSysParamsService == null ? applicationContext.getBean(SysParamsService.class): remoteSysParamsService;
CzgResult<SysParamsDTO> aliSmsKey = sysParamsService.getParamsByCode("ali_sms_key"); CzgResult<SysParamsDTO> aliSmsKey = sysParamsService.getParamsByCode("ali_sms_key");
CzgResult<SysParamsDTO> aliSmsSecret = sysParamsService.getParamsByCode("ali_sms_secret"); CzgResult<SysParamsDTO> aliSmsSecret = sysParamsService.getParamsByCode("ali_sms_secret");
@@ -54,7 +54,6 @@ public class SmsUtil {
secret = aliSmsSecret.getData().getParamValue(); secret = aliSmsSecret.getData().getParamValue();
templateCode = aliSmsTemplateCode.getData().getParamValue(); templateCode = aliSmsTemplateCode.getData().getParamValue();
log.info("短信工具类初始化完毕key: {}, secret: {}, templateCode: {}", key, secret, templateCode); log.info("短信工具类初始化完毕key: {}, secret: {}, templateCode: {}", key, secret, templateCode);
return sysParamsService;
} }
public Client createClient() throws Exception { public Client createClient() throws Exception {