From eb6b6dbb35a9f029e0b7d269773685c19fd40976 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 11 七月 2024 10:47:51 +0800 Subject: [PATCH] 玩湃微信商户认证代码 --- cloud-server-other/src/main/java/com/dsh/other/controller/ProtocolController.java | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/ProtocolController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/ProtocolController.java index 8394193..b1b62ee 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/ProtocolController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/ProtocolController.java @@ -22,24 +22,21 @@ private IProtocolService protocolService; - @ResponseBody @PostMapping("/queryProtocol") @ApiOperation(value = "获取各种协议", tags = {"用户—登录注册"}) @ApiImplicitParams({ - @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书)", name = "type", dataType = "int", required = true) + @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书,4=注销协议)", name = "type", dataType = "int", required = true) }) - public ResultUtil<String> queryProtocol(@RequestBody Integer type){ + public ResultUtil<String> queryProtocol(Integer type) { try { Protocol protocol = protocolService.getBaseMapper().selectOne(new QueryWrapper<Protocol>().eq("type", type)); - return ResultUtil.success(protocol.getContent()); - }catch (Exception e){ + return ResultUtil.success(null == protocol ? "" : protocol.getContent()); + } catch (Exception e) { e.printStackTrace(); return ResultUtil.runErr(); } } - - } -- Gitblit v1.7.1