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