From a114c9691298a6b947928f9eba9f3d4263afc171 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 24 Dec 2018 22:57:00 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=AE=E4=BF=A1=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=BC=80=E6=94=BE=E5=B9=B3=E5=8F=B0][=E6=96=B0=E5=A2=9E]:?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WechatWeappSetController.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WechatWeappSetController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WechatWeappSetController.java index 9cd821a2d..d32e9c44f 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WechatWeappSetController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WechatWeappSetController.java @@ -11,10 +11,7 @@ import me.chanjar.weixin.open.bean.result.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -51,9 +48,9 @@ public class WechatWeappSetController { " \"downloaddomain\":[\"https://www.qq.com\",\"https://www.qq.com\"],\n" + " }") @PostMapping("/modifyDomain") - public ResultData modifyDomain(String appId, String action, - List requestDomain, List wsrequestdomain, - List uploaddomain, List downloaddomain) { + public ResultData modifyDomain(@RequestParam(value = "appId") String appId, @RequestParam(value = "action") String action, + @RequestParam(value = "requestDomain") List requestDomain, @RequestParam(value = "wsrequestdomain") List wsrequestdomain, + @RequestParam(value = "uploaddomain") List uploaddomain, @RequestParam(value = "downloaddomain") List downloaddomain) { try { WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); WxOpenMaDomainResult openRet = openMaService.modifyDomain(action, @@ -67,9 +64,13 @@ public class WechatWeappSetController { return new ResultData(Result.ERROR); } - @ApiOperation(value = "设置小程序业务域名", notes = "extInfo参考https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html") + @ApiOperation(value = "设置小程序业务域名", notes = "{\n" + + " \"action\":\"add\",\n" + + " \"webviewdomain\":[\"https://www.qq.com\",\"https://m.qq.com\"]\n" + + " }") @PostMapping("/setWebViewDomain") - public ResultData setWebViewDomain(String appId, String action, List urlList) { + public ResultData setWebViewDomain(@RequestParam(value = "appId") String appId, @RequestParam(value = "action") String action, + @RequestParam(value = "urlList") List urlList) { try { WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); String openRet = openMaService.setWebViewDomain(action, urlList);