package cn.stylefeng.team.project.modular.filing.controller;

import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.team.project.modular.filing.pojo.page.BusinessDesignPageRequest;
import cn.stylefeng.team.project.modular.filing.pojo.userfiling.TableFilingItemVo;
import cn.stylefeng.team.project.modular.filing.service.BusinessDesignService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

@RestController
@ApiResource(name = "用户数据填报接口")
public class BusinessFilingController {

    @Resource
    private BusinessDesignService businessDesignService;

    @GetResource(name = "获取用户能填报的业务列表", path = "/business/getUserFilingPageList")
    public ResponseData<PageResult<TableFilingItemVo>> getUserFilingPageList(BusinessDesignPageRequest businessDesignPageRequest) {
        PageResult<TableFilingItemVo> result = businessDesignService.getUserFilingPageList(businessDesignPageRequest);
        return new SuccessResponseData<>(result);
    }

}
