解决日志时间段查询的bug

This commit is contained in:
季圣华
2021-06-15 01:09:48 +08:00
parent 792483453b
commit 4694580ca1

View File

@@ -67,6 +67,8 @@ public class LogService {
String content, int offset, int rows)throws Exception { String content, int offset, int rows)throws Exception {
List<LogVo4List> list=null; List<LogVo4List> list=null;
try{ try{
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
list=logMapperEx.selectByConditionLog(operation, userId, clientIp, status, beginTime, endTime, list=logMapperEx.selectByConditionLog(operation, userId, clientIp, status, beginTime, endTime,
content, offset, rows); content, offset, rows);
if (null != list) { if (null != list) {
@@ -84,6 +86,8 @@ public class LogService {
String content)throws Exception { String content)throws Exception {
Long result=null; Long result=null;
try{ try{
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
result=logMapperEx.countsByLog(operation, userId, clientIp, status, beginTime, endTime, content); result=logMapperEx.countsByLog(operation, userId, clientIp, status, beginTime, endTime, content);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);