| | |
| | | ad.longitude, |
| | | ad.latitude, |
| | | ad.area_size, |
| | | concat(ST_AsText(ad.geom), ' | ', ST_SRID(ad.geom)) as geom, |
| | | concat(ST_AsText(ST_SwapXY(ad.geom)), ' | ', ST_SRID(ad.geom)) as geom, |
| | | ad.area_type, |
| | | ad.trigger_condition, |
| | | ad.response_mechanism, |
| | |
| | | </if> |
| | | <if test="param2.areaSize != null and param2.areaSize != ''"> |
| | | and ad.area_size = #{param2.areaSize} |
| | | </if> |
| | | <if test="param2.geom != null and param2.geom != ''"> |
| | | and ST_Equals( |
| | | ad.geom, |
| | | ST_SRID( |
| | | ST_GeomFromText( |
| | | trim(case when instr(#{param2.geom}, '|') > 0 then substring_index(#{param2.geom}, '|', 1) else #{param2.geom} end) |
| | | ), |
| | | case when instr(#{param2.geom}, '|') > 0 then cast(trim(substring_index(#{param2.geom}, '|', -1)) as unsigned) else 4326 end |
| | | ) |
| | | ) |
| | | </if> |
| | | <if test="param2.areaType != null and param2.areaType != ''"> |
| | | and ad.area_type = #{param2.areaType} |
| | |
| | | ad.longitude, |
| | | ad.latitude, |
| | | ad.area_size, |
| | | concat(ST_AsText(ad.geom), ' | ', ST_SRID(ad.geom)) as geom, |
| | | concat(ST_AsText(ST_SwapXY(ad.geom)), ' | ', ST_SRID(ad.geom)) as geom, |
| | | ad.area_type, |
| | | ad.trigger_condition, |
| | | ad.response_mechanism, |
| | |
| | | #{areaSize}, |
| | | <choose> |
| | | <when test="geom != null and geom != ''"> |
| | | ST_SRID( |
| | | ST_GeomFromText( |
| | | trim(case when instr(#{geom}, '|') > 0 then substring_index(#{geom}, '|', 1) else #{geom} end) |
| | | ), |
| | | case when instr(#{geom}, '|') > 0 then cast(trim(substring_index(#{geom}, '|', -1)) as unsigned) else 4326 end |
| | | ) |
| | | case |
| | | when instr(#{geom}, '|') > 0 then ST_GeomFromText( |
| | | trim(substring_index(#{geom}, '|', 1)), |
| | | cast(trim(substring_index(#{geom}, '|', -1)) as unsigned) |
| | | ) |
| | | else ST_GeomFromText(trim(#{geom})) |
| | | end |
| | | </when> |
| | | <otherwise>null</otherwise> |
| | | </choose>, |
| | |
| | | <if test="latitude != null">latitude = #{latitude},</if> |
| | | <if test="areaSize != null">area_size = #{areaSize},</if> |
| | | <if test="geom != null and geom != ''"> |
| | | geom = ST_SRID( |
| | | ST_GeomFromText( |
| | | trim(case when instr(#{geom}, '|') > 0 then substring_index(#{geom}, '|', 1) else #{geom} end) |
| | | ), |
| | | case when instr(#{geom}, '|') > 0 then cast(trim(substring_index(#{geom}, '|', -1)) as unsigned) else 4326 end |
| | | ), |
| | | geom = case |
| | | when instr(#{geom}, '|') > 0 then ST_GeomFromText( |
| | | trim(substring_index(#{geom}, '|', 1)), |
| | | cast(trim(substring_index(#{geom}, '|', -1)) as unsigned) |
| | | ) |
| | | else ST_GeomFromText(trim(#{geom})) |
| | | end, |
| | | </if> |
| | | <if test="areaType != null">area_type = #{areaType},</if> |
| | | <if test="triggerCondition != null">trigger_condition = #{triggerCondition},</if> |