package com.changhu.module.miniProgram.controller;

import com.changhu.common.annotation.CheckUserType;
import com.changhu.common.annotation.JsonBody;
import com.changhu.common.db.enums.UserType;
import com.changhu.module.miniProgram.pojo.vo.IndexServiceProjectListVo;
import com.changhu.module.miniProgram.service.ProjectManageIndexService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 20252
 * @createTime 2024/9/10 下午3:48
 * @desc 项目经理首页控制器
 */
@Tag(name = "微信小程序-首页-项目经理")
@JsonBody
@RequestMapping("/mp/pmi")
@RestController
public class ProjectManageIndexController {

    @Autowired
    private ProjectManageIndexService projectManageIndexService;

    @Operation(summary = "获取我的服务项目")
    @GetMapping("/get_my_sp")
    @CheckUserType(userTypes = UserType.MINI_PROGRAM_PROJECT_MANAGE)
    public List<IndexServiceProjectListVo> getMyServiceProjectList() {
        return projectManageIndexService.getMyServiceProjectList();
    }

}
