refactor(logging): 补齐核心模块日志与中文注释约束
This commit is contained in:
@@ -5,6 +5,7 @@ import com.bruce.workflow.dto.ProjectSaveDTO;
|
||||
import com.bruce.workflow.service.IProjectService;
|
||||
import com.bruce.workflow.vo.ProjectVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -14,6 +15,12 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Studio 项目空间控制器。
|
||||
* <p>
|
||||
* 负责项目列表、详情和保存接口,对外统一返回 Project 相关 VO。
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/studio-projects")
|
||||
@RequiredArgsConstructor
|
||||
@@ -23,16 +30,19 @@ public class ProjectController {
|
||||
|
||||
@GetMapping("/list")
|
||||
public RequestResult<List<ProjectVO>> list() {
|
||||
log.info("Studio项目列表查询开始");
|
||||
return RequestResult.success(projectService.listProjects());
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
public RequestResult<ProjectVO> detail(@RequestParam("id") Long id) {
|
||||
log.info("Studio项目详情查询开始,projectId={}", id);
|
||||
return RequestResult.success(projectService.getProject(id));
|
||||
}
|
||||
|
||||
@PostMapping("/save")
|
||||
public RequestResult<Boolean> save(@RequestBody ProjectSaveDTO request) {
|
||||
log.info("Studio项目保存开始,projectId={}, projectCode={}", request.getId(), request.getProjectCode());
|
||||
return RequestResult.success(projectService.saveProject(request));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user