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
add feature : query top n success process instance order by running duration #3315
Conversation
Hi, have you encountered any problems? You can add me to WeChat to communicate. My WeChat is Kris_Evil |
@RequestParam(value = "endTime",required = true) String endTime | ||
|
||
){ | ||
projectName=projectName.replaceAll("[\n|\r\t]", "_"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should improve the handleEscapes method, this is a historical problem. like this:return inputString.replace("%", "////%").replaceAll("[\n|\r|\t]", "_");
improve handleEscape method in ParameterUtils.java
@@ -204,6 +205,29 @@ public Result queryProcessInstanceById(@ApiIgnore @RequestAttribute(value = Cons | |||
return returnDataList(result); | |||
} | |||
|
|||
@ApiOperation(value = "queryTopNLongestRunningProcessInstance", notes = "QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok , I will do it in next commit
putMsg(result, Status.DATA_IS_NULL, Constants.END_TIME); | ||
return result; | ||
} | ||
Date end=DateUtils.stringToDate(endTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date end=DateUtils.stringToDate(endTime); | |
Date end = DateUtils.stringToDate(endTime); |
putMsg(result, Status.DATA_IS_NULL, Constants.START_TIME); | ||
return result; | ||
} | ||
Date start=DateUtils.stringToDate(startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Date start=DateUtils.stringToDate(startTime); | |
Date start = DateUtils.stringToDate(startTime); |
* @param endTime | ||
* @return | ||
*/ | ||
public Map<String, Object> queryTopNLongestRunningProcessInstance(User loginUser,String projectName,int size, String startTime, String endTime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Map<String, Object> queryTopNLongestRunningProcessInstance(User loginUser,String projectName,int size, String startTime, String endTime) { | |
public Map<String, Object> queryTopNLongestRunningProcessInstance(User loginUser, String projectName, int size, String startTime, String endTime) { |
public static final String START_TIME="start time"; | ||
public static final String END_TIME="end time"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final String START_TIME="start time"; | |
public static final String END_TIME="end time"; | |
public static final String START_TIME = "start time"; | |
public static final String END_TIME = "end time"; |
@@ -147,6 +147,40 @@ public void testQueryProcessInstanceList() { | |||
|
|||
} | |||
|
|||
@Test | |||
public void testQueryTopNLongestRunningProcessInstance(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void testQueryTopNLongestRunningProcessInstance(){ | |
public void testQueryTopNLongestRunningProcessInstance() { |
return result; | ||
} | ||
Date end=DateUtils.stringToDate(endTime); | ||
if(start == null || end == null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(start == null || end == null){ | |
if(start == null || end == null) { |
@RequestParam(value = "startTime",required = true) String startTime, | ||
@RequestParam(value = "endTime",required = true) String endTime | ||
|
||
){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
){ | |
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format this code. Thx a lot~
In fact, the replacement of the CRLF string has been completed here, and I don't understand why sonar still reports this error.
On 07/29/2020 19:46,Yichao Yang<notifications@github.com> wrote:
Good job,
I think this sonar checker can be removed. @dailidong , Please help to confirm.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
SonarCloud Quality Gate failed. 0 Bugs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
this check could be ignore sometimes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
good job
close #3191 |
What is the purpose of the pull request
close (#3191)
Brief change log
Verify this pull request
Manually verified the change by testing locally.