吉安感知网项目-后端
linwei
4 days ago 0e40d8768f082632e9a9b384c9ab056aba2a4d23
fix(gd): 修复时间查询参数类型转换问题

- 在shoot_time查询条件中添加timestamp类型转换
- 解决startTime和endTime参数的时间戳格式问题
- 确保数据库时间比较的一致性
1 files modified
4 ■■■■ changed files
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml 4 ●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
@@ -151,10 +151,10 @@
            and ce.dispose_user = #{userId}
        </if>
        <if test="startTime != null and startTime != ''">
            and tr.shoot_time &gt;= #{startTime}
            and tr.shoot_time &gt;= #{startTime}::timestamp
        </if>
        <if test="endTime != null and endTime != ''">
            and tr.shoot_time &lt;= #{endTime}
            and tr.shoot_time &lt;= #{endTime}::timestamp
        </if>
        order by ce.create_time desc
    </select>