Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【1.1.16】interface api opmizition #294

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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