package com.izouma.nineth.web.mobile.open.v1;


import com.izouma.nineth.domain.Banner;
import com.izouma.nineth.dto.PageQuery;
import com.izouma.nineth.exception.BusinessException;
import com.izouma.nineth.repo.BannerRepo;
import com.izouma.nineth.service.BannerService;
import com.izouma.nineth.web.BaseController;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/banner/v1")
@AllArgsConstructor
public class BannerControllerOpenV1{
    private BannerService bannerService;


    @PostMapping("/all")
    public Page<Banner> all(@RequestBody PageQuery pageQuery) {
        pageQuery.getQuery().put("del", false);
        return bannerService.all(pageQuery);
    }


}

