From a1e4cfc3de4f3f3f3956b769bc7af40d097c8a4c Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期二, 17 十月 2023 15:12:57 +0800 Subject: [PATCH] 修改bug --- cloud-server-other/src/main/java/com/dsh/other/controller/ProtocolController.java | 4 ++-- 1 files changed, 2 insertions(+), 2 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..051d1f4 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 @@ -29,10 +29,10 @@ @ApiImplicitParams({ @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书)", 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()); + return ResultUtil.success(null == protocol ? "" : protocol.getContent()); }catch (Exception e){ e.printStackTrace(); return ResultUtil.runErr(); -- Gitblit v1.7.1