select rule_id, rule_name, rule_type, product_code, country_code, customer_code,
weight_min, weight_max, weight_source, side_sum_max,
status, remark, create_by, create_time, update_by, update_time, del_flag
from biz_rule
insert into biz_rule (
rule_name, rule_type, product_code, country_code, customer_code, weight_min, weight_max,
weight_source, side_sum_max, status, remark, create_by, create_time, del_flag
) values (
#{ruleName}, #{ruleType}, #{productCode}, #{countryCode}, #{customerCode}, #{weightMin}, #{weightMax},
#{weightSource}, #{sideSumMax}, #{status}, #{remark}, #{createBy}, sysdate(), '0'
)
update biz_rule
rule_name = #{ruleName},
rule_type = #{ruleType},
product_code = #{productCode},
country_code = #{countryCode},
customer_code = #{customerCode},
weight_min = #{weightMin},
weight_max = #{weightMax},
weight_source = #{weightSource},
side_sum_max = #{sideSumMax},
status = #{status},
remark = #{remark},
update_by = #{updateBy},
update_time = sysdate()
where rule_id = #{ruleId} and del_flag = '0'
update biz_rule
set del_flag = '1',
update_time = sysdate()
where rule_id in
#{id}