diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxAppinfoController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxAppinfoController.java index d7f2e05df..6c6f2132a 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxAppinfoController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxAppinfoController.java @@ -93,10 +93,11 @@ public class WxAppinfoController extends BaseController { return new ResultData(Result.SUCCESS, "查询成功", wxAppinfoService.getById(id)); } - @ApiOperation(value = "下载二维码", notes = "参数{\"pageUrl\":\"String\", \"sceneParam\":\"二维码参数\", \"type\":0:有限二维码,1:无限二维码,\"withText\":int(0:不带字, 1:加一行字,2:加两行字),\"text1\":\"String\",\"text2\":\"String\"}") + @ApiOperation(value = "下载二维码", notes = "参数{\"name\":\"String\",\"pageUrl\":\"String\", \"sceneParam\":\"二维码参数\", \"type\":0:有限二维码,1:无限二维码,\"withText\":int(0:不带字, 1:加一行字,2:加两行字),\"text1\":\"String\",\"text2\":\"String\"}") @PostMapping("/downQrCode") public ResultData downQrCode(HttpServletRequest request, HttpServletResponse response, @RequestBody Map params) { logger.debug("[" + getIpAddr() + "] WxAppinfoController::downQrCode"); + String name = (String) params.get("name"); String pageUrl = (String) params.get("pageUrl"); String sceneParam = (String) params.get("sceneParam"); int type = 0; @@ -120,7 +121,8 @@ public class WxAppinfoController extends BaseController { try { exportQrcode(request, response, getTenantId(), type, pageUrl, sceneParam, - withText, text1, text2); + withText, text1, text2, + name); } catch (Exception e) { logger.error(e.getMessage()); } @@ -130,7 +132,8 @@ public class WxAppinfoController extends BaseController { private void exportQrcode(HttpServletRequest request, HttpServletResponse response, String tenantId, int type, String pageUrl, String sceneParam, - int withText, String text1, String text2 ) { + int withText, String text1, String text2, + String name) { // type 0 有限二维码, 1 无限制二维码 // withText 0 不带字 1. 带下面的字,2 带下面的两行字 WxAppinfo appinfo = wxAppinfoService.getCAppInfo(tenantId); @@ -154,7 +157,7 @@ public class WxAppinfoController extends BaseController { String filepath = Constant.fileDirectory; - String fileName = sceneParam + ".png"; + String fileName = name + ".png"; String destPath1 = filepath + "1_" + fileName; String destPath = filepath + fileName;