Skip to content

Commit

Permalink
Merge pull request #294 from WeDataSphere/dev-1.1.16-code-opmization
Browse files Browse the repository at this point in the history
【1.1.16】interface api opmizition
  • Loading branch information
casionone authored Oct 7, 2023
2 parents f8db7d1 + 8c6c341 commit 51f9131
Showing 1 changed file with 34 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ public Message list(
/** Method list should not contain subjob, which may cause performance problems. */
@ApiOperation(value = "listundonetasks", notes = "list undone tasks", response = Message.class)
@ApiImplicitParams({
@ApiImplicitParam(name = "startDate", dataType = "long"),
@ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"),
@ApiImplicitParam(name = "status", required = false, dataType = "String", value = "status"),
@ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"),
@ApiImplicitParam(name = "pageSize", dataType = "Integer"),
@ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"),
@ApiImplicitParam(name = "engineType", dataType = "String"),
@ApiImplicitParam(name = "startTaskID", dataType = "long"),
@ApiImplicitParam(name = "startDate", required = false, dataType = "Long", value = "start date"),
@ApiImplicitParam(name = "endDate", required = false, dataType = "Long", value = "end date"),
@ApiImplicitParam(name = "status", required = false, dataType = "String", value = "status"),
@ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"),
@ApiImplicitParam(name = "pageSize", required = false, dataType = "Integer", value = "page size"),
@ApiImplicitParam(name = "startTaskID", required = false, dataType = "Long", value = "start task id"),
@ApiImplicitParam(name = "engineType", required = false, dataType = "String", value = "engine type"),
@ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator")
})
@RequestMapping(path = "/listundonetasks", method = RequestMethod.GET)
public Message listundonetasks(
Expand Down Expand Up @@ -326,13 +326,29 @@ public Message listundonetasks(

@ApiOperation(value = "listundone", notes = "list undone", response = Message.class)
@ApiImplicitParams({
@ApiImplicitParam(name = "startDate", dataType = "long"),
@ApiImplicitParam(name = "endDate", required = false, dataType = "long", value = "end date"),
@ApiImplicitParam(name = "status", required = false, dataType = "String", value = "status"),
@ApiImplicitParam(
name = "startDate",
required = false,
dataType = "Long",
value = "start date"),
@ApiImplicitParam(name = "endDate", required = false, dataType = "Long", value = "end date"),
@ApiImplicitParam(name = "pageNow", required = false, dataType = "Integer", value = "page now"),
@ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator"),
@ApiImplicitParam(name = "engineType", dataType = "String"),
@ApiImplicitParam(name = "startTaskID", dataType = "long"),
@ApiImplicitParam(
name = "pageSize",
required = false,
dataType = "Integer",
value = "page size"),
@ApiImplicitParam(
name = "startTaskID",
required = false,
dataType = "Long",
value = "startTaskID"),
@ApiImplicitParam(
name = "engineType",
required = false,
dataType = "String",
value = "engineType"),
@ApiImplicitParam(name = "creator", required = false, dataType = "String", value = "creator")
})
/** Method list should not contain subjob, which may cause performance problems. */
@RequestMapping(path = "/listundone", method = RequestMethod.GET)
Expand All @@ -355,17 +371,13 @@ public Message listundone(
}
if (StringUtils.isEmpty(creator)) {
creator = null;
} else {
if (!QueryUtils.checkNameValid(creator)) {
return Message.error("Invalid creator : " + creator);
}
} else if (!QueryUtils.checkNameValid(creator)) {
return Message.error("Invalid creator : " + creator);
}
if (StringUtils.isEmpty(engineType)) {
engineType = null;
} else {
if (!QueryUtils.checkNameValid(engineType)) {
return Message.error("Invalid engienType: " + engineType);
}
} else if (!QueryUtils.checkNameValid(engineType)) {
return Message.error("Invalid engienType: " + engineType);
}
Date sDate = new Date(startDate);
Date eDate = new Date(endDate);
Expand Down

0 comments on commit 51f9131

Please sign in to comment.