首页>代码>SpringBoot开发网站后台管理系统>/springboot-mini/src/main/java/com/zyxx/api/controller/NewsInfoApiController.java
package com.zyxx.api.controller; import com.zyxx.api.service.NewsInfoApiService; import com.zyxx.common.utils.ResponseResult; import com.zyxx.sys.service.SysDictDetailService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 新闻资讯 * * @Author Lizhou * @Date 2020-09-26 10:28:28 **/ @Api(tags = "新闻资讯") @RestController @RequestMapping("api/newsInfo") public class NewsInfoApiController { @Autowired private NewsInfoApiService newsInfoApiService; @Autowired private SysDictDetailService sysDictDetailService; @ApiOperation(value = "获取新闻资讯类型", notes = "获取新闻资讯类型") @GetMapping("listNewsType") public ResponseResult listNewsType() { return ResponseResult.success(sysDictDetailService.listSysDictDetailByDictCode("news_type")); } @ApiOperation(value = "根据类型分页查询新闻资讯", notes = "根据类型分页查询新闻资讯") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "页码"), @ApiImplicitParam(name = "limit", value = "条数"), @ApiImplicitParam(name = "type", value = "类型") }) @PostMapping("listNewsInfoByType") public ResponseResult listNewsInfoByType(Integer page, Integer limit, Integer type) { return newsInfoApiService.listNewsInfoByType(page, limit, type); } @ApiOperation(value = "获取新闻资讯详情", notes = "获取新闻资讯详情") @ApiImplicitParams(@ApiImplicitParam(name = "id", value = "id", required = true)) @PostMapping("getNewsInfoById") public ResponseResult getNewsInfoById(Integer id) { return newsInfoApiService.getNewsInfoById(id); } }
最近下载更多
Luck_ZDM LV11
4月12日
13521878735 LV3
3月26日
森sdfgf LV8
2月8日
skook7 LV2
2023年12月14日
qwerdf963 LV3
2023年11月20日
JAVA小菜雀 LV7
2023年11月9日
edpwyg LV14
2023年10月22日
asdsasddas LV6
2023年4月20日
ming_123_9715 LV23
2023年4月9日
huangkexin LV1
2023年4月4日