feat(项目概览):动态

This commit is contained in:
wanjia 2024-12-11 15:44:45 +08:00
parent 8ae43e5dc2
commit 421b0f7e40
3 changed files with 23 additions and 0 deletions

View File

@ -165,4 +165,14 @@ public class PmsProjectController extends BaseController
return success(pmsProjectService.getPmsProjectPolyline(pmProjectId));
}
/**
* 获取项目概览-动态
*/
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
@GetMapping(value = "/statistics/dynamics")
@ApiOperation(value = "项目概览-动态")
public AjaxResult getDynamics(@ApiParam("项目id") @RequestParam Long pmProjectId) {
return success(pmsProjectService.getPmsProjectDynamics(pmProjectId));
}
}

View File

@ -455,6 +455,14 @@ public class PmsProjectServiceImpl implements IPmsProjectService
}
}
@Override
public JSONObject getPmsProjectDynamics(Long pmProjectId) {
// 校验数据权限
selectAndCheckPmsProjectById(pmProjectId);
JSONObject result = gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_OPERATE_JOURNALS(pmProjectId));
//todo 获取项目其他模块操作记录和项目动态合并取top10
return result.getJSONObject(DATA_KEY);
}
@Override
public JSONObject getPmsProjectStatistics(Long pmProjectId) {

View File

@ -386,4 +386,9 @@ public class PmsGitLinkRequestUrl extends GitLinkRequestUrl {
return getGitLinkRequestUrl(
String.format("/api/pm/dashboards/my_projects?project_id=%d", repositoryId));
}
public static GitLinkRequestUrl GET_OPERATE_JOURNALS(Long pmProjectId) {
return getGitLinkRequestUrl(
String.format("/api/pm/dashboards/my_operate_journals?pm_project_id=%d&page=1&limit=10", pmProjectId));
}
}