insert into
pay_control_rule(
name,
`condition`,
condition_id,
operator,
value,
action,
unit,
disable,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag,
site_id,
customer_id
)
values (
#{payControlRule.name,jdbcType=VARCHAR},
#{payControlRule.condition,jdbcType=VARCHAR},
#{payControlRule.conditionId,jdbcType=INTEGER},
#{payControlRule.operator,jdbcType=VARCHAR},
#{payControlRule.value,jdbcType=VARCHAR},
#{payControlRule.action,jdbcType=VARCHAR},
#{payControlRule.unit,jdbcType=VARCHAR},
#{payControlRule.disable,jdbcType=VARCHAR},
#{payControlRule.createBy,jdbcType=BIGINT},
#{payControlRule.createDate,jdbcType=TIMESTAMP},
#{payControlRule.updateBy,jdbcType=BIGINT},
#{payControlRule.updateDate,jdbcType=TIMESTAMP},
#{payControlRule.remarks,jdbcType=VARCHAR},
#{payControlRule.delFlag,jdbcType=VARCHAR},
#{payControlRule.siteId,jdbcType=BIGINT},
#{payControlRule.customerId,jdbcType=BIGINT}
)
update pay_control_rule set del_flag = 1 where id = #{id,jdbcType=INTEGER}
update pay_control_rule pcr
pcr.name = #{payControlRule.name},
pcr.condition = #{payControlRule.condition},
pcr.condition_id = #{payControlRule.conditionId},
pcr.value = #{payControlRule.value},
pcr.operator = #{payControlRule.operator},
pcr.action = #{payControlRule.action},
pcr.unit = #{payControlRule.unit},
pcr.disable = #{payControlRule.disable},
pcr.update_by = #{payControlRule.updateBy},
pcr.update_date = #{payControlRule.updateDate},
pcr.remarks = #{payControlRule.remarks},
pcr.del_flag = #{payControlRule.delFlag}
where id = #{payControlRule.id}