package com.haisen.laop.controller;
import com.haisen.laop.common.Result;
import com.haisen.laop.dto.AppBannerQueryDTO;
import com.haisen.laop.dto.AppBannerSaveDTO;
import com.haisen.laop.service.AppBannerService;
import com.haisen.laop.vo.AppBannerVO;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
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 java.util.HashMap;
import java.util.Map;
/**
* 轮播图模块 —— Web 后台管理端 Controller。
*
*
消费端:Web 管理后台(管理员电脑端操作)。
*
路径前缀:{@code /banner/*},与小程序端展示接口(待扩展)严格隔离。
*
职责:承载首页轮播图的维护操作(分页查询、详情、新增、编辑、排序调整、启停、删除),
* 业务逻辑全部委托 {@link AppBannerService},本层只做参数接收与 Result 包装。
*
* @author duhao
*/
@RestController
@RequestMapping("/banner")
@RequiredArgsConstructor
public class AppBannerController {
private final AppBannerService appBannerService;
/**
* 轮播图分页列表。
*
* 返回结构与项目其他分页约定保持一致:{list, totalElements, totalPages, pageNo, pageSize},
* 其中 pageNo 为 0 基页码。
*
* @param query 筛选条件(GET 参数自动绑定,全部可选)
* @return 轮播图 VO 分页数据
*/
@GetMapping("/list")
public Result