id, sn, name, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
iccid, merchant_id, station_id, fault_reason, create_by, create_time, update_by, update_time, del_flag, remark
select
from pile_basic_info
insert into pile_basic_info
sn,
name,
business_type,
secret_key,
software_protocol,
production_date,
licence_id,
model_id,
sim_id,
iccid,
merchant_id,
station_id,
fault_reason,
create_by,
create_time,
update_by,
update_time,
del_flag,
remark,
#{sn},
#{name},
#{businessType},
#{secretKey},
#{softwareProtocol},
#{productionDate},
#{licenceId},
#{modelId},
#{simId},
#{iccId},
#{merchantId},
#{stationId},
#{faultReason},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{delFlag},
#{remark},
update pile_basic_info
sn = #{sn},
name = #{name},
business_type = #{businessType},
secret_key = #{secretKey},
software_protocol = #{softwareProtocol},
production_date = #{productionDate},
licence_id = #{licenceId},
model_id = #{modelId},
sim_id = #{simId},
iccid = #{iccId},
merchant_id = #{merchantId},
station_id = #{stationId},
fault_reason = #{faultReason},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
del_flag = #{delFlag},
remark = #{remark},
where id = #{id}
delete from pile_basic_info where id = #{id}
delete from pile_basic_info where id in
#{id}
insert into pile_basic_info
(sn, name, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id, iccid,
merchant_id, station_id, fault_reason, create_by, update_by, del_flag, remark)
values
(
#{item.sn,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR},
#{item.businessType,jdbcType=VARCHAR},
#{item.secretKey,jdbcType=VARCHAR},
#{item.softwareProtocol,jdbcType=VARCHAR},
#{item.productionDate,jdbcType=TIMESTAMP},
#{item.licenceId,jdbcType=BIGINT},
#{item.modelId,jdbcType=BIGINT},
#{item.simId,jdbcType=BIGINT},
#{item.iccId,jdbcType=VARCHAR},
#{item.merchantId,jdbcType=BIGINT},
#{item.stationId,jdbcType=BIGINT},
#{item.faultReason,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.updateBy,jdbcType=VARCHAR},
#{item.delFlag,jdbcType=VARCHAR},
#{item.remark,jdbcType=VARCHAR}
)
update pile_basic_info
merchant_id = #{merchantId},
station_id = #{stationId},
business_type = #{chargerPileType,jdbcType=VARCHAR},
secret_key = null,
secret_key = substring(uuid(), 1, 8),
model_id = #{modelId},
update_by = #{updateBy},
update_time = #{updateTime},
where id in
#{pileId,jdbcType=BIGINT}
update
pile_basic_info
set
merchant_id = #{newMerchantId,jdbcType=VARCHAR}
where
id in
#{item,jdbcType=BIGINT}