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.pojo.appcenter.AppCenterCategory;
import cn.stylefeng.team.portal.modular.front.pojo.request.AppCenterRequest;
import cn.stylefeng.team.portal.modular.front.service.AppCenterService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@ApiResource(name = "应用中心")
public class AppCenterController {

    @Resource
    private AppCenterService appCenterService;

    @GetResource(name = "主页应用分类+链接", path = "/appCenter/getTotalCategoryAndLink")
    public ResponseData<List<AppCenterCategory>> getTotalCategoryAndLink(AppCenterRequest appCenterRequest) {
        List<AppCenterCategory> list = appCenterService.getTotalCategoryAndLink(appCenterRequest);
        return new SuccessResponseData<>(list);
    }

}
