package com.bonus.app.controller;

import com.bonus.app.service.IAppIndexService;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.entity.app.AppParamsDto;
import com.bonus.common.entity.app.vo.CarouseVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @className:AppIndexController
 * @author:cwchen
 * @date:2024-08-21-15:55
 * @version:1.0
 * @description:APP首页
 */
@RestController
@RequestMapping("/appIndex/")
@Slf4j
public class AppIndexController {

    @Resource(name = "IAppIndexService")
    private IAppIndexService service;

    /**
     * 首页轮播图
     * @param dto
     * @return AjaxResult
     * @author cwchen
     * @date 2024/8/21 16:03
     */
    @GetMapping("carouselList")
    public AjaxResult carouselList(AppParamsDto dto) {
        List<CarouseVo> list = service.carouselList(dto);
        return AjaxResult.success(list);
    }
}
