select thisTab.id, thisTab.consignor_code, thisTab.consignor_name, thisTab.customer_id, thisTab.customer_name, thisTab.customer_sys_code, thisTab.consignor_type, thisTab.contact_name, thisTab.contact_phone, thisTab.contact_email, thisTab.country_id, thisTab.province_id, thisTab.city_id, thisTab.district_id, thisTab.street_id, thisTab.address_detail, thisTab.dispatch_transport_area, thisTab.map_location, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark, thisTab.region_label ,thisTab.electronic_fence_range from tms_consignor AS thisTab select count(0) from tms_consignor as thisTab and thisTab.consignor_code = #{consignorCode} and thisTab.consignor_name like concat('%', #{consignorName}, '%') and thisTab.customer_id = #{customerId} and thisTab.customer_name like concat('%', #{customerName}, '%') and thisTab.customer_sys_code = #{customerSysCode} and thisTab.consignor_type = #{consignorType} and thisTab.contact_name like concat('%', #{contactName}, '%') and thisTab.contact_phone = #{contactPhone} and thisTab.contact_email = #{contactEmail} and thisTab.country_id = #{countryId} and thisTab.province_id = #{provinceId} and thisTab.city_id = #{cityId} and thisTab.district_id = #{districtId} and thisTab.street_id = #{streetId} and thisTab.address_detail = #{addressDetail} and thisTab.dispatch_transport_area = #{dispatchTransportArea} and thisTab.map_location = #{mapLocation} and thisTab.status = #{status} and thisTab.region_label = #{regionLabel} and thisTab.electronic_fence_range = #{electronicFenceRange} insert into tms_consignor consignor_code, consignor_name, customer_id, customer_name, customer_sys_code, consignor_type, contact_name, contact_phone, contact_email, country_id, province_id, city_id, district_id, street_id, address_detail, dispatch_transport_area, map_location, status, create_by, create_time, update_by, update_time, remark, region_label, electronic_fence_range, #{consignorCode}, #{consignorName}, #{customerId}, #{customerName}, #{customerSysCode}, #{consignorType}, #{contactName}, #{contactPhone}, #{contactEmail}, #{countryId}, #{provinceId}, #{cityId}, #{districtId}, #{streetId}, #{addressDetail}, #{dispatchTransportArea}, #{mapLocation}, #{status}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{regionLabel}, #{electronicFenceRange}, insert into tms_consignor id,consignor_code,consignor_name,customer_id,customer_name,customer_sys_code,consignor_type,contact_name,contact_phone,contact_email,country_id,province_id,city_id,district_id,street_id,address_detail,dispatch_transport_area,map_location,status,create_by,create_time,update_by,update_time,remark,region_label,electronic_fence_range #{item.id},#{item.consignorCode},#{item.consignorName},#{item.customerId},#{item.customerName},#{item.customerSysCode},#{item.consignorType},#{item.contactName},#{item.contactPhone},#{item.contactEmail},#{item.countryId},#{item.provinceId},#{item.cityId},#{item.districtId},#{item.streetId},#{item.addressDetail},#{item.dispatchTransportArea},#{item.mapLocation},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.regionLabel},#{item.electronicFenceRange}, update tms_consignor consignor_code = #{consignorCode}, consignor_name = #{consignorName}, customer_id = #{customerId}, customer_name = #{customerName}, customer_sys_code = #{customerSysCode}, consignor_type = #{consignorType}, contact_name = #{contactName}, contact_phone = #{contactPhone}, contact_email = #{contactEmail}, country_id = #{countryId}, province_id = #{provinceId}, city_id = #{cityId}, district_id = #{districtId}, street_id = #{streetId}, address_detail = #{addressDetail}, dispatch_transport_area = #{dispatchTransportArea}, map_location = #{mapLocation}, status = #{status}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, region_label = #{regionLabel}, electronic_fence_range = #{electronicFenceRange}, where id = #{id} update tms_consignor consignor_code = #{item.consignorCode}, consignor_name = #{item.consignorName}, customer_id = #{item.customerId}, customer_name = #{item.customerName}, customer_sys_code = #{item.customerSysCode}, consignor_type = #{item.consignorType}, contact_name = #{item.contactName}, contact_phone = #{item.contactPhone}, contact_email = #{item.contactEmail}, country_id = #{item.countryId}, province_id = #{item.provinceId}, city_id = #{item.cityId}, district_id = #{item.districtId}, street_id = #{item.streetId}, address_detail = #{item.addressDetail}, dispatch_transport_area = #{item.dispatchTransportArea}, map_location = #{item.mapLocation}, status = #{item.status}, create_by = #{item.createBy}, create_time = #{item.createTime}, update_by = #{item.updateBy}, update_time = #{item.updateTime}, remark = #{item.remark}, region_label = #{item.regionLabel}, electronic_fence_range = #{item.electronicFenceRange}, where id = #{item.id} delete from tms_consignor where id = #{id} delete from tms_consignor where id in #{id}