package cn.stylefeng.team.portal.modular.front.controller;

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.portal.modular.front.service.PortalRenderService;
import cn.stylefeng.team.portal.modular.management.pojo.response.PortalDesignVo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@ApiResource(name = "门户前台渲染")
public class PortalRenderController {

    @Resource
    private PortalRenderService portalRenderService;

    @GetResource(name = "当前用户拥有的门户列表", path = "/portalRender/getUserPortalList")
    public ResponseData<List<PortalDesignVo>> getUserPortalList() {
        List<PortalDesignVo> list = portalRenderService.getUserPortalList();
        return new SuccessResponseData<>(list);
    }

}
