package com.dg.core.controller;
|
|
import com.dg.core.ResultData;
|
import com.dg.core.annotation.Authorization;
|
import com.dg.core.db.gen.entity.Agreement;
|
import com.dg.core.db.gen.entity.OrganizationChartEntity;
|
import com.dg.core.db.gen.entity.Slideshow;
|
import com.dg.core.service.ISlideshowService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
@Api(tags = {"轮播图接口"})
|
@RestController
|
@RequestMapping("/slideshow")
|
public class SlideshowController extends BaseController{
|
|
@Autowired(required = true)
|
ISlideshowService iSlideshowService;
|
|
/**
|
* 查询轮播图列表(不分页)
|
* @return
|
*/
|
@ApiOperation(value = "查询轮播图列表(不分页)",response = Slideshow.class)
|
@GetMapping("/selectList")
|
public ResultData selectList(){
|
return ResultData.success(iSlideshowService.selectList());
|
|
}
|
|
/**
|
* 根据id 查询轮播图数据
|
*
|
* @return 参数配置信息
|
*/
|
@ApiOperation(value = "根据id 查询轮播图数据",response = Slideshow.class)
|
@GetMapping("/selectById")
|
public ResultData queryById(Integer id){
|
return ResultData.success(iSlideshowService.queryById(id));
|
}
|
|
|
/**
|
* 根据id 新增轮播图数据
|
*
|
* @return 参数配置信息
|
*/
|
@ApiOperation(value = "新增轮播图数据",response = Slideshow.class)
|
@PostMapping("/add")
|
public ResultData add(@RequestBody Slideshow slideshow){
|
return iSlideshowService.add(slideshow);
|
}
|
|
/**
|
* 修改轮播图数据
|
*
|
* @return 参数配置信息
|
*/
|
@ApiOperation(value = "修改轮播图数据",response = Slideshow.class)
|
@PostMapping("/update")
|
@Authorization
|
public ResultData update(@RequestBody Slideshow slideshow){
|
return iSlideshowService.update(slideshow);
|
}
|
|
/**
|
* 删除轮播图数据
|
*
|
* @return 参数配置信息
|
*/
|
@ApiOperation(value = "删除轮播图数据",response = Slideshow.class)
|
@GetMapping("/delete")
|
@Authorization
|
public ResultData delete(@RequestParam("id") Integer id){
|
return iSlideshowService.delete(id);
|
}
|
|
}
|