Commit 8424a03c by 陶光胜

用户资源

parent 2ebc73cb
package com.gic.auth.config;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableApolloConfig
public class Config {
@Value("${appkey}")
private String appkey;
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
}
......@@ -2,6 +2,7 @@ package com.gic.auth.service.outer.impl;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.config.Config;
import com.gic.auth.dto.AuditorDTO;
import com.gic.auth.entity.TabAuditor;
import com.gic.auth.entity.TabAuditorAuditedGroupRel;
......@@ -62,8 +63,8 @@ public class AuditorApiServiceImpl implements AuditorApiService {
private ServiceUserApiService serviceUserApiService;
@Autowired
private UserService userService;
// 服务号APPKEY
public static final String APPKEY = "wxc6fd9beaf9a9dbe9";
@Autowired
private Config config;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -286,7 +287,7 @@ public class AuditorApiServiceImpl implements AuditorApiService {
private String getTempQrCodeUrl(Integer auditorId) {
logger.info("生成临时带参二维码 auditorId:{}", auditorId);
ServiceResponse<String> serviceResponse = weixinBaseFunService.getTemporaryQRcodeURL(APPKEY, "auditor_" + auditorId, 300);
ServiceResponse<String> serviceResponse = weixinBaseFunService.getTemporaryQRcodeURL(config.getAppkey(), "auditor_" + auditorId, 300);
if (serviceResponse.isSuccess()) {
logger.info("临时带参二维码生成成功:{}", serviceResponse.getResult());
return serviceResponse.getResult();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment