fix 项目列表创建时间搜索

This commit is contained in:
renzexin 2024-08-23 10:06:53 +08:00
parent c4e6f8fcf2
commit 39eca08f6d
1 changed files with 11 additions and 0 deletions

View File

@ -64,6 +64,8 @@ public class WrkProjectController {
public AjaxResult list(WrkProject project) public AjaxResult list(WrkProject project)
{ {
CommonParam commonParam = CommonParam.buildPageRequest(); CommonParam commonParam = CommonParam.buildPageRequest();
List<String> createTimes = project.getCreateTimes();
project.setCreateTimes(extendTimeRange(createTimes, " 00:00:00", " 23:59:59"));
PageResult pageResult = projectService.pageList(project, commonParam); PageResult pageResult = projectService.pageList(project, commonParam);
return AjaxResult.success(pageResult); return AjaxResult.success(pageResult);
} }
@ -292,4 +294,13 @@ public class WrkProjectController {
// //
private List<String> extendTimeRange(List<String> timeList, String prefix, String suffix) {
if (timeList != null && timeList.size() >= 2) {
String startTime = timeList.get(0) + prefix;
String endTime = timeList.get(1) + suffix;
timeList.set(0, startTime);
timeList.set(1, endTime);
}
return timeList;
}
} }