Ver Fonte

修改分页

yq há 4 anos atrás
pai
commit
b69317b291

+ 4 - 10
fiveep-persistence/src/main/resources/mapper/mysql/AlarmPowerMapper.xml

@@ -36,11 +36,8 @@
             <if test="handlingStatus != null">
                 and ap.handling_status = #{handlingStatus}
             </if>
-            <if test="startTime != null">
-                and ap.soe_time = #{startTime}
-            </if>
-            <if test="endTime != null">
-                and ap.soe_time = #{endTime}
+            <if test="startTime != null and endTime != null">
+                and ap.soe_time between #{startTime} and #{endTime}
             </if>
             <if test="measName != null and measName != ''">
                 and ap.meas_name = #{measName}
@@ -67,11 +64,8 @@
             <if test="handlingStatus != null">
                 and ap.handling_status = #{handlingStatus}
             </if>
-            <if test="startTime != null">
-                and ap.soe_time >= #{startTime}
-            </if>
-            <if test="endTime != null">
-                and ap.soe_time &lt;= #{endTime}
+            <if test="startTime != null and endTime != null">
+                and ap.soe_time between #{startTime} and #{endTime}
             </if>
         </where>
     </select>