Commit 34273db3 by shenjunjie

Merge branch 'feature' into 'release'

绑定项目补充过滤条件

See merge request !615
parents ceb23b0a b041fbb2
......@@ -160,7 +160,14 @@ public class ProjectController extends BaseController {
public ResponseResult getLinkedGroups(@RequestParam(value = "keyword", defaultValue = "") String keyword) {
ResponseEntity<JSONObject> entity = restTemplate.getForEntity(yqProjectUrl, JSONObject.class);
List<JSONObject> dataList = Objects.requireNonNull(entity.getBody()).getJSONArray("data").toJavaList(JSONObject.class);
List<JSONObject> resList = dataList.stream().filter(json -> json.getString("projectName").contains(keyword)).map(json -> {
List<JSONObject> resList = dataList.stream().filter(json -> {
// 排除停用项目
Integer status = json.getInteger("status");
if (null == status || 0 == status) {
return false;
}
return json.getString("projectName").contains(keyword);
}).map(json -> {
JSONObject res = new JSONObject();
res.put("groupName", json.getString("projectName"));
res.put("id", json.getString("id"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment