26 lines
849 B
Java
26 lines
849 B
Java
|
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<ProjectVO> projectVOList = projectService.userProject(id);
|
||
|
return JsonData.buildSuccess(projectVOList);
|
||
|
}
|
||
|
}
|