package com.playlet.web.controller.app;

import com.github.pagehelper.PageInfo;
import com.playlet.common.core.controller.BaseController;
import com.playlet.common.core.domain.Result;
import com.playlet.system.domain.PlayletItem;
import com.playlet.web.service.app.PlayletItemAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * @Date: 2024-03-14-22:59
 * @Author: 但星霖
 * @Version: v1.0
 * @Description: 短剧基础app Controller Controller
 */
@Slf4j
@Api(tags = "短剧视频*短剧列表")
@RestController
@RequestMapping(value = "/app/item")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class PlayletItemAppController extends BaseController {

    private final PlayletItemAppService playletItemAppService;

    /**
     * 查询短剧基础列表
     */
    @ResponseBody
    @PostMapping("/getItemList")
    @ApiOperation(value = "分页查询短剧基础列表")
    public Result<PageInfo<PlayletItem>> getItemList(@RequestBody PlayletItem playletItem,
                                   @RequestParam(value = "pageNum")Integer pageNum,
                                   @RequestParam(value = "pageSize")Integer pageSize) {
        return Result.success(playletItemAppService.getItemPage(playletItem, pageNum, pageSize));
    }

}
