Merge pull request '疑修列表接口' (#972) from wanjia9506/microservices:dev_issues_transform into master

This commit is contained in:
wanjia9506 2025-07-30 14:38:29 +08:00
commit 30463e9113
3 changed files with 13 additions and 7 deletions

View File

@ -30,21 +30,21 @@ public class PmsForgeApiForwardController {
"sort_by:排序字段如updated_on;\n" + "sort_by:排序字段如updated_on;\n" +
"sort_direction:排序方向asc升序或desc降序;\n" + "sort_direction:排序方向asc升序或desc降序;\n" +
"is_public:是否公开项目true或false;\n" + "is_public:是否公开项目true或false;\n" +
"keyword:代码库名称关键字") "search:代码库名称关键字")
public AjaxResult listProjects(@PathVariable String enterpriseIdentifier, public AjaxResult listProjects(@PathVariable String enterpriseIdentifier,
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page, @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
@RequestParam(value = "limit", required = false, defaultValue = "15") Integer limit, @RequestParam(value = "limit", required = false, defaultValue = "15") Integer limit,
@RequestParam(value = "sort_by", required = false) String sortBy, @RequestParam(value = "sort_by", required = false) String sortBy,
@RequestParam(value = "sort_direction", required = false) String sortDirection, @RequestParam(value = "sort_direction", required = false) String sortDirection,
@RequestParam(value = "is_public", required = false) Boolean isPublic, @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(); JSONObject projectSearchInputVo = new JSONObject();
projectSearchInputVo.put("page", page); projectSearchInputVo.put("page", page);
projectSearchInputVo.put("limit", limit); projectSearchInputVo.put("limit", limit);
projectSearchInputVo.put("sort_by", sortBy); projectSearchInputVo.put("sort_by", sortBy);
projectSearchInputVo.put("sort_direction", sortDirection); projectSearchInputVo.put("sort_direction", sortDirection);
projectSearchInputVo.put("is_public", isPublic); projectSearchInputVo.put("is_public", isPublic);
projectSearchInputVo.put("keyword", keyword); projectSearchInputVo.put("search", search);
JSONObject result = pmsForgeApiForwardService.selectForgeRepositoryList(enterpriseIdentifier, projectSearchInputVo); JSONObject result = pmsForgeApiForwardService.selectForgeRepositoryList(enterpriseIdentifier, projectSearchInputVo);
return success(result); return success(result);
} }
@ -75,7 +75,8 @@ public class PmsForgeApiForwardController {
@RequestParam(value = "sort_by", required = false) String sortBy, @RequestParam(value = "sort_by", required = false) String sortBy,
@RequestParam(value = "sort_direction", required = false) String sortDirection, @RequestParam(value = "sort_direction", required = false) String sortDirection,
@RequestParam(value = "participant_category", required = false) String participantCategory, @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(); JSONObject issueSearch = new JSONObject();
issueSearch.put("page", page); issueSearch.put("page", page);
issueSearch.put("limit", limit); issueSearch.put("limit", limit);
@ -83,7 +84,8 @@ public class PmsForgeApiForwardController {
issueSearch.put("sort_direction", sortDirection); issueSearch.put("sort_direction", sortDirection);
issueSearch.put("participant_category", participantCategory); issueSearch.put("participant_category", participantCategory);
issueSearch.put("category", category); issueSearch.put("category", category);
JSONObject result = pmsForgeApiForwardService.selectForgeIssueList(issueSearch); issueSearch.put("keyword", keyword);
JSONObject result = pmsForgeApiForwardService.selectForgeIssueList(owner, repo, issueSearch);
return success(result); return success(result);
} }

View File

@ -23,9 +23,9 @@ public class PmsForgeApiForwardService {
} }
} }
public JSONObject selectForgeIssueList(JSONObject issueSearch) { public JSONObject selectForgeIssueList(String owner, String repo, JSONObject issueSearch) {
try { try {
return gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_ISSUE_LIST(issueSearch)); return gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_FORGE_ISSUE_LIST(owner, repo, issueSearch));
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

View File

@ -500,6 +500,10 @@ public class PmsGitLinkRequestUrl extends GitLinkRequestUrl {
return getGitLinkRequestUrl(path); 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) { public static GitLinkRequestUrl DELETE_ISSUE(String repo, String owner, String issueId) {
return getGitLinkRequestUrl(String.format("/api/v1/%s/%s/issues/%s", owner, repo, issueId)); return getGitLinkRequestUrl(String.format("/api/v1/%s/%s/issues/%s", owner, repo, issueId));
} }