lyhzzz 2 年 前
コミット
f567488046

+ 2 - 2
src/main/java/com/fdkankan/tk/service/DataCountService.java

@@ -135,8 +135,8 @@ public class DataCountService {
         if(roomIds.isEmpty()){
             return roomVisitData;
         }
-        startTime = Dateutils.formatStartTimeDay(startTime);
-        endTime = Dateutils.formatEndTimeDay(endTime);
+        startTime = Dateutils.formatStartTime(startTime);
+        endTime = Dateutils.formatEndTime(endTime);
         List<DataCount> dbVisitList = roomVisitLogService.getByGroupRoomId("t_room_visit_log",roomIds,startTime,endTime);
         List<DataCount>  dbVisitListFmt =  getDataCountListByList(dbVisitList, startTime, endTime);
 

+ 2 - 2
src/main/resources/mapper/tk/RoomVisitLogMapper.xml

@@ -33,7 +33,7 @@
             </foreach>
         </if>
         <if test="startTime != null and startTime !='' and endTime != null and endTime !=''">
-            and  DATE_FORMAT(create_time,'%Y-%m-%d')  &gt;= #{startTime}   and  DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endTime}
+            and  create_time &gt;= #{startTime}   and create_time &lt;= #{endTime}
         </if>
         group by dataKey
 
@@ -49,7 +49,7 @@
             </foreach>
         </if>
         <if test="startTime != null and startTime !='' and endTime != null and endTime !=''">
-            and  DATE_FORMAT(create_time,'%Y-%m-%d')  &gt;= #{startTime}   and  DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endTime}
+            and  create_time  &gt;= #{startTime}   and create_time &lt;= #{endTime}
         </if>
         group by dataKey