insert into mp_payment_record(
mp_id, first_print_date, resolution_number, print_amount,
arrival_date, arrival_amount, withdrawer, shortage_or_arrears,
road_name, lane, `door`, room, owner_address, print_count, snake_case
) values (
#{mpId}, #{firstPrintDate}, #{resolutionNumber},
0
#{printAmount},
#{arrivalDate},
0
#{arrivalAmount},
#{withdrawer},
0
#{shortageOrArrears},
#{roadName}, #{lane}, #{door}, #{room}, #{ownerAddress},
#{printCount}, #{snakeCase}
)
delete from mp_payment_record t
where 1 = 1
and t.id = #{id}
and t.mp_id = #{mpId}
and t.first_print_date >= #{startDate}
and t.first_print_date <= #{endDate}
and t.snake_case = #{snakeCase}
update mp_payment_record t set t.id = #{id}
,t.b_id = #{newBId}
, t.mp_id = #{mpId}
, t.first_print_date = #{firstPrintDate}
, t.resolution_number = #{resolutionNumber}
, t.print_amount = #{printAmount}
, t.arrival_date = #{arrivalDate}
, t.arrival_amount = #{arrivalAmount}
, t.withdrawer = #{withdrawer}
, t.shortage_or_arrears = #{shortageOrArrears}
, t.road_name = #{roadName}
, t.lane = #{lane}
, t.door = #{door}
, t.room = #{room}
, t.owner_address = #{ownerAddress}
, t.print_count = #{printCount}
, t.snake_case = #{snakeCase}
where 1=1
and t.id = #{id}
insert into mp_payment_record(
mp_id, first_print_date, resolution_number, print_amount,
arrival_date, arrival_amount, withdrawer, shortage_or_arrears,
road_name, lane, `door`, room, owner_address, id, print_count, snake_case
) values
( #{item.mpId}, #{item.firstPrintDate}, #{item.resolutionNumber},
0#{item.printAmount},
#{item.arrivalDate},
0#{item.arrivalAmount},
#{item.withdrawer},
0#{item.shortageOrArrears},
#{item.roadName}, #{item.lane}, #{item.door}, #{item.room}, #{item.ownerAddress}, #{id},
#{item.printCount}, #{item.snakeCase}
)