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