select rule_id, dept_id, dept_id, `name`, `explain`,
status, auto_refund_deposit, order_exceed_minutes, order_exceed_warn,
free_ride_time, rental_unit, riding_rule, riding_rule_json, charging_cycle, charging_cycle_value,
capped_amount, instructions, create_by, create_time from et_fee_rule
insert into et_fee_rule
`name`,
dept_id,
`explain`,
status,
auto_refund_deposit,
order_exceed_minutes,
order_exceed_warn,
free_ride_time,
rental_unit,
riding_rule,
riding_rule_json,
charging_cycle,
charging_cycle_value,
capped_amount,
instructions,
create_by,
create_time,
#{name},
#{deptId},
#{explain},
#{status},
#{autoRefundDeposit},
#{orderExceedMinutes},
#{orderExceedWarn},
#{freeRideTime},
#{rentalUnit},
#{ridingRule},
#{ridingRuleJson},
#{chargingCycle},
#{chargingCycleValue},
#{cappedAmount},
#{instructions},
#{createBy},
#{createTime},
update et_fee_rule
`name` = #{name},
dept_id = #{deptId},
`explain` = #{explain},
status = #{status},
auto_refund_deposit = #{autoRefundDeposit},
order_exceed_minutes = #{orderExceedMinutes},
order_exceed_warn = #{orderExceedWarn},
free_ride_time = #{freeRideTime},
rental_unit = #{rentalUnit},
riding_rule = #{ridingRule},
riding_rule_json = #{ridingRuleJson},
charging_cycle = #{chargingCycle},
charging_cycle_value = #{chargingCycleValue},
capped_amount = #{cappedAmount},
instructions = #{instructions},
create_by = #{createBy},
create_time = #{createTime},
where rule_id = #{ruleId}
delete from et_fee_rule where rule_id = #{ruleId}
update et_fee_rule
set is_deleted = 1
where rule_id in
#{ruleId}