Commit 55d6f2a2 by 陶光胜

生成观云台小程序二维码

parent 974abc63
......@@ -36,6 +36,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -65,6 +66,8 @@ public class QrcodeController {
private WeixinWxaFunService weixinWxaFunService;
@Autowired
private DownloadReportApiService downloadReportApiService;
@Autowired
Environment environment;
@RequestMapping("list-scenes-classify")
public RestResponse listScenesClassify(){
......@@ -257,18 +260,8 @@ public class QrcodeController {
@RequestMapping("take-gyt-qrcode")
public RestResponse takeGytQrcode(){
String path = "pages/customView/customView";
String appkey = "wxba807000b40c9c78";
logger.info("生成观云台小程序二维码");
byte[] appletQrcode = this.createAppletQrcode(appkey, path, null);
UploadResult uploadResult = QqCloudPicUtils.uploadLocalPicStream("pic01", "", appletQrcode);
Map<String, Object> pic = new HashMap<>();
pic.put("fileId", uploadResult.getFileId());
pic.put("url", uploadResult.getUrl());
pic.put("downloadUrl", uploadResult.getDownloadUrl());
pic.put("path", path);
logger.info("观云台小程序二维码:{}", JSON.toJSONString(pic));
return RestResponse.success(pic);
String qrCode = environment.getProperty("gyt-qrcode");
return RestResponse.success(qrCode);
}
@RequestMapping("take-store-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