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);
|
}
|
|
}
|