luodangjia
2024-07-29 dc9239d73b15b9a51c46a9e8d25c0d4400e613ce
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/RotateController.java
@@ -9,6 +9,7 @@
import com.ruoyi.admin.service.RotateService;
import com.ruoyi.admin.vo.RotateResultVO;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -45,6 +46,7 @@
     * @param pageSize 每页显示条数
     * @return 封装分页数据
     */
    @RequiresPermissions("system_rotate")
    @ApiOperation(value = "轮播图分页查询列表", tags = {"后台-系统设置-轮播图管理"})
    @GetMapping(value = "/page")
    @ApiImplicitParams({
@@ -61,8 +63,9 @@
     */
    @GetMapping(value = "/bannerList")
    public R<List<Rotate>> bannerList() {
        return R.ok(rotateService.lambdaQuery().eq(Rotate::getIsDelete, 0)
                .orderByAsc(Rotate::getSort).list());
        return R.ok(rotateService.lambdaQuery()
                .eq(Rotate::getIsDelete, 0)
                .orderByDesc(Rotate::getSort).list());
    }
    /**
@@ -71,6 +74,7 @@
     * @param id 轮播图id
     * @return 封装分页数据
     */
    @RequiresPermissions("rotate_detail")
    @ApiOperation(value = "轮播图详情", tags = {"后台-系统设置-轮播图管理"})
    @GetMapping(value = "/detail")
    @ApiImplicitParams({
@@ -95,6 +99,7 @@
     * @param rotate 轮播图信息
     * @return 封装分页数据
     */
    @RequiresPermissions("rotate_save")
    @ApiOperation(value = "新增轮播图", tags = {"后台-系统设置-轮播图管理"})
    @PostMapping(value = "/save")
    public R<String> save(@RequestBody Rotate rotate) {
@@ -107,6 +112,7 @@
     * @param rotate 轮播图信息
     * @return 封装分页数据
     */
    @RequiresPermissions("rotate_update")
    @ApiOperation(value = "修改轮播图", tags = {"后台-系统设置-轮播图管理"})
    @PostMapping(value = "/update")
    public R<String> update(@RequestBody Rotate rotate) {
@@ -119,6 +125,7 @@
     * @param ids 轮播图多条id拼接
     * @return 封装分页数据
     */
    @RequiresPermissions("rotate_delete")
    @ApiOperation(value = "批量删除轮播图", tags = {"后台-系统设置-轮播图管理"})
    @GetMapping(value = "/batchDelete")
    @ApiImplicitParams({