支付宝和微信工具类参数从sysParam取出
This commit is contained in:
parent
68b7adb552
commit
f5af188439
|
|
@ -24,7 +24,7 @@ import org.springframework.stereotype.Component;
|
||||||
public class SmsUtil {
|
public class SmsUtil {
|
||||||
@Resource
|
@Resource
|
||||||
private ApplicationContext applicationContext;
|
private ApplicationContext applicationContext;
|
||||||
@DubboReference(check = false)
|
// @DubboReference(check = false)
|
||||||
private SysParamsService remoteSysParamsService;
|
private SysParamsService remoteSysParamsService;
|
||||||
private SysParamsService sysParamsService;
|
private SysParamsService sysParamsService;
|
||||||
|
|
||||||
|
|
@ -46,14 +46,14 @@ public class SmsUtil {
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void 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");
|
||||||
CzgResult<SysParamsDTO> aliSmsTemplateCode = sysParamsService.getParamsByCode("ali_sms_template_code");
|
// CzgResult<SysParamsDTO> aliSmsTemplateCode = sysParamsService.getParamsByCode("ali_sms_template_code");
|
||||||
key = aliSmsKey.getData().getParamValue();
|
// key = aliSmsKey.getData().getParamValue();
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Client createClient() throws Exception {
|
public Client createClient() throws Exception {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue