feat(社区版项目管理):#3676 疑修列表接口
This commit is contained in:
parent
5122204fe8
commit
113a84b023
|
@ -30,21 +30,21 @@ public class PmsForgeApiForwardController {
|
|||
"sort_by:排序字段,如updated_on;\n" +
|
||||
"sort_direction:排序方向,asc升序或desc降序;\n" +
|
||||
"is_public:是否公开项目,true或false;\n" +
|
||||
"keyword:代码库名称关键字")
|
||||
"search:代码库名称关键字")
|
||||
public AjaxResult listProjects(@PathVariable String enterpriseIdentifier,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "limit", required = false, defaultValue = "15") Integer limit,
|
||||
@RequestParam(value = "sort_by", required = false) String sortBy,
|
||||
@RequestParam(value = "sort_direction", required = false) String sortDirection,
|
||||
@RequestParam(value = "is_public", required = false) Boolean isPublic,
|
||||
@RequestParam(value = "keyword", required = false) String keyword) {
|
||||
@RequestParam(value = "keyword", required = false) String search) {
|
||||
JSONObject projectSearchInputVo = new JSONObject();
|
||||
projectSearchInputVo.put("page", page);
|
||||
projectSearchInputVo.put("limit", limit);
|
||||
projectSearchInputVo.put("sort_by", sortBy);
|
||||
projectSearchInputVo.put("sort_direction", sortDirection);
|
||||
projectSearchInputVo.put("is_public", isPublic);
|
||||
projectSearchInputVo.put("keyword", keyword);
|
||||
projectSearchInputVo.put("search", search);
|
||||
JSONObject result = pmsForgeApiForwardService.selectForgeRepositoryList(enterpriseIdentifier, projectSearchInputVo);
|
||||
return success(result);
|
||||
}
|
||||
|
@ -75,7 +75,8 @@ public class PmsForgeApiForwardController {
|
|||
@RequestParam(value = "sort_by", required = false) String sortBy,
|
||||
@RequestParam(value = "sort_direction", required = false) String sortDirection,
|
||||
@RequestParam(value = "participant_category", required = false) String participantCategory,
|
||||
@RequestParam(value = "category", required = false) String category) {
|
||||
@RequestParam(value = "category", required = false) String category,
|
||||
@RequestParam(value = "keyword", required = false) String keyword) {
|
||||
JSONObject issueSearch = new JSONObject();
|
||||
issueSearch.put("page", page);
|
||||
issueSearch.put("limit", limit);
|
||||
|
@ -83,7 +84,8 @@ public class PmsForgeApiForwardController {
|
|||
issueSearch.put("sort_direction", sortDirection);
|
||||
issueSearch.put("participant_category", participantCategory);
|
||||
issueSearch.put("category", category);
|
||||
JSONObject result = pmsForgeApiForwardService.selectForgeIssueList(issueSearch);
|
||||
issueSearch.put("keyword", keyword);
|
||||
JSONObject result = pmsForgeApiForwardService.selectForgeIssueList(owner, repo, issueSearch);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ public class PmsForgeApiForwardService {
|
|||
}
|
||||
}
|
||||
|
||||
public JSONObject selectForgeIssueList(JSONObject issueSearch) {
|
||||
public JSONObject selectForgeIssueList(String owner, String repo, JSONObject issueSearch) {
|
||||
try {
|
||||
return gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_ISSUE_LIST(issueSearch));
|
||||
return gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_FORGE_ISSUE_LIST(owner, repo, issueSearch));
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
@ -500,6 +500,10 @@ public class PmsGitLinkRequestUrl extends GitLinkRequestUrl {
|
|||
return getGitLinkRequestUrl(path);
|
||||
}
|
||||
|
||||
public static GitLinkRequestUrl GET_FORGE_ISSUE_LIST(String owner, String repo, JSONObject issueSearch) throws URISyntaxException {
|
||||
return getGitLinkRequestUrl(buildUri(String.format("/api/v1/%s/%s/issues", owner, repo), issueSearch));
|
||||
}
|
||||
|
||||
public static GitLinkRequestUrl DELETE_ISSUE(String repo, String owner, String issueId) {
|
||||
return getGitLinkRequestUrl(String.format("/api/v1/%s/%s/issues/%s", owner, repo, issueId));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue