| | |
| | | SELECT * FROM ja_fw_area_divide_ext ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <insert id="insertBatchWithGeom"> |
| | | insert into ja_fw_area_divide_ext ( |
| | | area_divide_id, |
| | | area_type_key, |
| | | area_type_value, |
| | | geom, |
| | | area_code, |
| | | create_user, |
| | | create_dept, |
| | | create_time, |
| | | update_user, |
| | | update_time, |
| | | status, |
| | | is_deleted |
| | | ) values |
| | | <foreach collection="list" item="item" separator=","> |
| | | ( |
| | | #{item.areaDivideId}, |
| | | #{item.areaTypeKey}, |
| | | #{item.areaTypeValue}, |
| | | <choose> |
| | | <when test="item.geom != null and item.geom != ''"> |
| | | case |
| | | when instr(#{item.geom}, '|') > 0 then ST_SRID( |
| | | ST_GeomFromText(trim(substring_index(#{item.geom}, '|', 1))), |
| | | cast(trim(substring_index(#{item.geom}, '|', -1)) as unsigned) |
| | | ) |
| | | else ST_GeomFromText(trim(#{item.geom})) |
| | | end |
| | | </when> |
| | | <otherwise>null</otherwise> |
| | | </choose>, |
| | | #{item.areaCode}, |
| | | #{item.createUser}, |
| | | #{item.createDept}, |
| | | #{item.createTime}, |
| | | #{item.updateUser}, |
| | | #{item.updateTime}, |
| | | IFNULL(#{item.status}, '0'), |
| | | IFNULL(#{item.isDeleted}, 0) |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | </mapper> |