package com.corewing.app.modules.downloadCenter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.corewing.app.common.Result;
import com.corewing.app.dto.ResourcePageRequest;
import com.corewing.app.entity.BizResource;
import com.corewing.app.service.BizResourceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;

/**
 * 资源接口
 */
@Api(tags = "资源接口")
@RestController
@RequestMapping("/api/app/resource")
public class BizResourceController {

    @Resource
    private BizResourceService bizResourceService;

    /**
     * 获取资源分页
     * @param resourcePageRequest
     * @return
     */
    @ApiOperation("获取资源分页")
    @GetMapping("/page")
    public Result<Page<BizResource>> page(ResourcePageRequest resourcePageRequest) {
        return Result.success(bizResourceService.page(resourcePageRequest));
    }


}
