select id, external_id, pasture_name, farm_type, introduction, latitude, longitude,
county, town, floor_area, scale_breeding, breed_species,
detail_address, person_in_charge, contact_phone,
data_source, last_sync_time, del_flag,
create_by, create_time, update_by, update_time, remark
from biz_pasture
insert into biz_pasture (
external_id, pasture_name, farm_type, introduction, latitude, longitude,
county, town, floor_area, scale_breeding, breed_species,
detail_address, person_in_charge, contact_phone,
data_source, last_sync_time, del_flag,
create_by, create_time, remark
) values (
#{externalId}, #{pastureName}, #{farmType}, #{introduction}, #{latitude}, #{longitude},
#{county}, #{town}, #{floorArea}, #{scaleBreeding}, #{breedSpecies},
#{detailAddress}, #{personInCharge}, #{contactPhone},
#{dataSource}, #{lastSyncTime}, #{delFlag},
#{createBy}, #{createTime, jdbcType=TIMESTAMP}, #{remark}
)
update biz_pasture set
external_id = #{externalId},
pasture_name = #{pastureName},
farm_type = #{farmType},
introduction = #{introduction},
latitude = #{latitude},
longitude = #{longitude},
county = #{county},
town = #{town},
floor_area = #{floorArea},
scale_breeding = #{scaleBreeding},
breed_species = #{breedSpecies},
detail_address = #{detailAddress},
person_in_charge = #{personInCharge},
contact_phone = #{contactPhone},
data_source = #{dataSource},
last_sync_time = #{lastSyncTime},
del_flag = #{delFlag},
update_by = #{updateBy},
update_time = #{updateTime, jdbcType=TIMESTAMP},
remark = #{remark}
where id = #{id}