package net.carbon.controller; import net.carbon.model.vo.ProjectVO; import net.carbon.service.ProjectService; import net.carbon.utils.JsonData; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @RequestMapping("/api/project/v1") public class ProjectController { @Autowired private ProjectService projectService; @GetMapping("/info") public JsonData getUserProject(@RequestParam("id") Integer id){ List projectVOList = projectService.userProject(id); return JsonData.buildSuccess(projectVOList); } }