t.id
, t.primary_id
, t.insurance_id
, t.effective_time
, t.expiration_time
, t.is_payment
, t.payment_scope
, t.upper_limit
, t.lower_limit
, t.payment_proportion
, t.fixed_cost
, t.valid_num
, t.rentention_rule
, t.payment_cycle
, t.account_type
, t.cycle_setting
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
t.id
, t.primary_id
, t.insurance_id
, t.is_payment
, t.payment_scope
, t.payment_proportion
, t.fixed_cost
, t.valid_num
, t.rentention_rule
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
AND primary_id = #{primaryId}
INSERT INTO hrsa_scheme_detail
primary_id,
insurance_id,
effective_time,
expiration_time,
is_payment,
payment_scope,
upper_limit,
lower_limit,
payment_proportion,
fixed_cost,
valid_num,
rentention_rule,
payment_cycle,
account_type,
cycle_setting,
create_time,
update_time,
creator,
delete_type,
tenant_key,
#{primaryId},
#{insuranceId},
#{effectiveTime},
#{expirationTime},
#{isPayment},
#{paymentScope},
#{upperLimit},
#{lowerLimit},
#{paymentProportion},
#{fixedCost},
#{validNum},
#{rententionRule},
#{paymentCycle},
#{accountType},
#{cycleSetting},
#{createTime},
#{updateTime},
#{creator},
#{deleteType},
#{tenantKey},
select hrsa_scheme_detail_id.currval from dual
INSERT INTO hrsa_scheme_detail
primary_id,
insurance_id,
effective_time,
expiration_time,
is_payment,
payment_scope,
upper_limit,
lower_limit,
payment_proportion,
fixed_cost,
valid_num,
rentention_rule,
payment_cycle,
account_type,
cycle_setting,
create_time,
update_time,
creator,
delete_type,
tenant_key,
#{primaryId},
#{insuranceId},
#{effectiveTime},
#{expirationTime},
#{isPayment},
#{paymentScope},
#{upperLimit},
#{lowerLimit},
#{paymentProportion},
#{fixedCost},
#{validNum},
#{rententionRule},
#{paymentCycle},
#{accountType},
#{cycleSetting},
#{createTime},
#{updateTime},
#{creator},
#{deleteType},
#{tenantKey},
UPDATE hrsa_scheme_detail
SET delete_type = 1
WHERE delete_type = 0
AND primary_id IN
#{primaryIds}
UPDATE
hrsa_scheme_detail
SET delete_type = 1
WHERE primary_id IN
#{id}
update hrsa_scheme_detail
when id=#{item.id} then #{item.upperLimit}
when id=#{item.id} then #{item.fixedCost}
when id=#{item.id} then #{item.lowerLimit}
when id=#{item.id} then #{item.deleteType}
where
id in
#{item.id}
update hrsa_scheme_detail
payment_scope=#{paymentScope},
is_payment=#{isPayment},
delete_type=#{deleteType},
payment_proportion=#{paymentProportion},
upper_limit=#{upperLimit},
lower_limit=#{lowerLimit},
update_time=#{updateTime},
fixed_cost=#{fixedCost},
valid_num=#{validNum},
rentention_rule=#{rententionRule},
WHERE id = #{id} AND delete_type = 0