fix
Helius
2021-11-04 ede9a493166d6f91562bf5391a0e081e52ab560a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package com.xcong.excoin.modules.helpCenter.controller;
 
import javax.annotation.Resource;
import javax.validation.Valid;
 
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.helpCenter.dto.ImportantNoticePageDto;
import com.xcong.excoin.modules.helpCenter.dto.NewNoticePageDto;
import com.xcong.excoin.modules.helpCenter.dto.NewNoticeTypePageDto;
import com.xcong.excoin.modules.helpCenter.dto.NoticePageDto;
import com.xcong.excoin.modules.helpCenter.service.HelpCenterService;
import com.xcong.excoin.modules.helpCenter.vo.ImportantNoticeVo;
import com.xcong.excoin.modules.helpCenter.vo.NewNoticeInfoVo;
import com.xcong.excoin.modules.helpCenter.vo.NewNoticeTypeInfoVo;
import com.xcong.excoin.modules.helpCenter.vo.NoticeInfoVo;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
 
@RestController
@Slf4j
@RequestMapping(value = "/api/helpCenter")
@Api(value = "HelpCenterController", tags = "帮助中心")
public class HelpCenterController {
    
    @Resource
    HelpCenterService helpCenterService;
    
    /**
     *  公告类别列表
     */
    @ApiOperation(value="公告类别列表", notes="公告类别列表")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeTypeInfoVo.class)})
    @PostMapping(value = "/getNewNoticeTypeList")
    public Result  getNewNoticeTypeList(@RequestBody @Valid NewNoticeTypePageDto newNoticeTypePageDto) {
        return helpCenterService.getNewNoticeTypeList(newNoticeTypePageDto);
    }
    
    /**
     *  公告列表
     */
    @ApiOperation(value="公告列表", notes="公告列表")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeInfoVo.class)})
    @PostMapping(value = "/getNoticeList")
    public Result  getNoticeList(@RequestBody @Valid NoticePageDto noticePageDto) {
        return helpCenterService.getNoticeList(noticePageDto);
    }
    
    /**
     *  关于我们
     */
    @ApiOperation(value="关于我们", notes="关于我们")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NoticeInfoVo.class)})
    @GetMapping(value = "/getAboutUs")
    public Result  getAboutUs() {
        return helpCenterService.getAboutUs();
    }
    
    /**
     *  用户协议
     */
    @ApiOperation(value="用户协议", notes="用户协议")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NoticeInfoVo.class)})
    @GetMapping(value = "/getUserAgreement")
    public Result  getUserAgreement() {
        return helpCenterService.getUserAgreement();
    }
    
    /**
     *  首页轮播公告
     */
    @ApiOperation(value="首页轮播公告", notes="首页轮播公告")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeInfoVo.class)})
    @PostMapping(value = "/getFristNewNoticeList")
    public Result  getFristNewNoticeList(@RequestBody @Valid NewNoticePageDto newNoticePageDto) {
        return helpCenterService.getFristNewNoticeList(newNoticePageDto);
    }
    
    /**
     *  最新公告
     */
    @ApiOperation(value="最新公告", notes="最新公告")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NewNoticeInfoVo.class)})
    @PostMapping(value = "/getNewNoticeList")
    public Result  getNewNoticeList(@RequestBody @Valid NewNoticePageDto newNoticePageDto) {
        return helpCenterService.getNewNoticeList(newNoticePageDto);
    }
    
    /**
     *  重要公告
     */
    @ApiOperation(value="重要公告", notes="重要公告")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = ImportantNoticeVo.class)})
    @PostMapping(value = "/getImportantNoticeList")
    public Result  getImportantNoticeList(@RequestBody @Valid ImportantNoticePageDto importantNoticePageDto) {
        return helpCenterService.getImportantNoticeList(importantNoticePageDto);
    }
    
    /**
     *  公告详情
     */
    @ApiOperation(value="公告详情", notes="公告详情")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = NoticeInfoVo.class)})
    @GetMapping(value = "/getNoticeInfo")
    public Result  getNoticeInfo(@ApiParam(name = "Id", value = "ID", example = "1") @RequestParam(value = "Id", required = false) long Id) {
        return helpCenterService.getNoticeInfo(Id);
    }
 
}