44323
2024-03-18 537ed054fe1d9b40b4908cf41ce8c9a6a82d0df9
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 = {"用户—登录注册"})
    @ApiOperation(value = "获取各种协议", tags = {"用户—登录注册,用户—社区世界杯,用户—个人中心"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书)", name = "type", dataType = "int", required = true)
            @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书,4=注销协议,5=社区世界杯报名协议,6=二维码注意事项配置)", 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();
        }
    }
}