|
@@ -34,7 +34,7 @@
|
|
|
concat('[', wi.center_lng, ',', wi.center_lat, ']') as center_gis,
|
|
concat('[', wi.center_lng, ',', wi.center_lat, ']') as center_gis,
|
|
|
wi.center_address,
|
|
wi.center_address,
|
|
|
wi.warn_range,
|
|
wi.warn_range,
|
|
|
- wi.warn_time,
|
|
|
|
|
|
|
+ (wi.warn_time at time zone 'utc')::timestamp as warn_time,
|
|
|
wi.message,
|
|
wi.message,
|
|
|
dwt.name as warn_type_name,
|
|
dwt.name as warn_type_name,
|
|
|
wd.warn_id as wd_warn_id,
|
|
wd.warn_id as wd_warn_id,
|
|
@@ -49,8 +49,10 @@
|
|
|
<where>
|
|
<where>
|
|
|
deleted = 0
|
|
deleted = 0
|
|
|
<if test="startTime != null and endTime != null">
|
|
<if test="startTime != null and endTime != null">
|
|
|
- and warn_time >= #{startTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- and warn_time <= #{endTime,jdbcType=TIMESTAMP}
|
|
|
|
|
|
|
+ and warn_time >= (timezone('utc', #{startTime,jdbcType=TIMESTAMP} at time zone
|
|
|
|
|
+ current_setting('timezone')))
|
|
|
|
|
+ and warn_time <= (timezone('utc', #{endTime,jdbcType=TIMESTAMP} at time zone
|
|
|
|
|
+ current_setting('timezone')))
|
|
|
</if>
|
|
</if>
|
|
|
<if test="warnType !=null">
|
|
<if test="warnType !=null">
|
|
|
and warn_type = #{warnType,jdbcType=SMALLINT}
|
|
and warn_type = #{warnType,jdbcType=SMALLINT}
|
|
@@ -68,8 +70,10 @@
|
|
|
<where>
|
|
<where>
|
|
|
deleted = 0
|
|
deleted = 0
|
|
|
<if test="startTime != null and endTime != null">
|
|
<if test="startTime != null and endTime != null">
|
|
|
- and warn_time >= #{startTime,jdbcType=TIMESTAMP}
|
|
|
|
|
- and warn_time <= #{endTime,jdbcType=TIMESTAMP}
|
|
|
|
|
|
|
+ and warn_time >= (timezone('utc', #{startTime,jdbcType=TIMESTAMP} at time zone
|
|
|
|
|
+ current_setting('timezone')))
|
|
|
|
|
+ and warn_time <= (timezone('utc', #{endTime,jdbcType=TIMESTAMP} at time zone
|
|
|
|
|
+ current_setting('timezone')))
|
|
|
</if>
|
|
</if>
|
|
|
<if test="warnType !=null">
|
|
<if test="warnType !=null">
|
|
|
and warn_type = #{warnType,jdbcType=SMALLINT}
|
|
and warn_type = #{warnType,jdbcType=SMALLINT}
|