src/main/resources/mapper/SimuMapper.xml
@@ -17,7 +17,14 @@ now(), #{item.createUser}, #{item.bak}, ${item.geom} <choose> <when test="item.geom != null and item.geom != ''"> ST_GeomFromText('${item.geom}') </when> <otherwise> null </otherwise> </choose> ) </foreach> </insert> @@ -35,7 +42,14 @@ update_time=now(), update_user=#{item.updateUser}, bak=#{item.bak}, geom=${item.geom} <choose> <when test="item.geom != null and item.geom != ''"> geom = ST_GeomFromText('${item.geom}') </when> <otherwise> geom = null </otherwise> </choose> where id = #{item.id} </foreach> </update>