Commit b1572430 by 陶光胜

生成观云台小程序二维码

parent 55d6f2a2
package com.gic.enterprise.web.config;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
/**
......@@ -9,15 +10,17 @@ import org.springframework.context.annotation.Configuration;
* @author taogs
* @date 2020/9/11 15:28
*/
@Configuration
@EnableApolloConfig
public class Config {
@Value("${host}")
private String host;
@Value("${gyt-qrcode}")
private String gytQrcode;
public String getHost() {
return host;
public String getGytQrcode() {
return gytQrcode;
}
public void setHost(String host) {
this.host = host;
public void setGytQrcode(String gytQrcode) {
this.gytQrcode = gytQrcode;
}
}
......@@ -21,6 +21,7 @@ import com.gic.enterprise.service.DownloadReportApiService;
import com.gic.enterprise.service.QrCodeApiService;
import com.gic.enterprise.utils.UserDetail;
import com.gic.enterprise.utils.UserDetailUtils;
import com.gic.enterprise.web.config.Config;
import com.gic.enterprise.web.qo.QrcodeContent;
import com.gic.enterprise.web.qo.QrcodeQO;
import com.gic.enterprise.web.utils.QrcodeUtils;
......@@ -67,7 +68,7 @@ public class QrcodeController {
@Autowired
private DownloadReportApiService downloadReportApiService;
@Autowired
Environment environment;
private Config config;
@RequestMapping("list-scenes-classify")
public RestResponse listScenesClassify(){
......@@ -260,7 +261,7 @@ public class QrcodeController {
@RequestMapping("take-gyt-qrcode")
public RestResponse takeGytQrcode(){
String qrCode = environment.getProperty("gyt-qrcode");
String qrCode = config.getGytQrcode();
return RestResponse.success(qrCode);
}
......
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