refactor: 用户分页接口优化,添加创建时间范围查询参数
This commit is contained in:
1 parent
b6ee9d913a
commit
652bc18fd2
5 files changed
+58
-7
No files matched your search
@@ -0,0 +1,32 @@
|
||||
|
||||
package com.youlai.system.common.util;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日期工具类
|
||||
*
|
||||
* @author haoxr
|
||||
* @since 2.4.2
|
||||
*/
|
||||
public class DateUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 格式化日期范围
|
||||
*
|
||||
* @param createTimeRange
|
||||
* @return
|
||||
*/
|
||||
public static List<String> formatDateRange(List<String> createTimeRange) {
|
||||
if (CollectionUtil.isNotEmpty(createTimeRange) && createTimeRange.size() == 2) {
|
||||
createTimeRange.set(0, createTimeRange.get(0) + " 00:00:00");
|
||||
createTimeRange.set(1, createTimeRange.get(1) + " 23:59:59");
|
||||
return createTimeRange;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user