insert into supplier_coupon_buy(
create_user_id,supplier_id,quantity,create_user_name,remark,obj_name,coupon_id,store_id,value_price,create_user_tel,name,obj_id,buy_id,store_name
) values (
#{createUserId},#{supplierId},#{quantity},#{createUserName},#{remark},#{objName},#{couponId},#{storeId},#{valuePrice},#{createUserTel},#{name},#{objId},#{buyId},#{storeName}
)
update supplier_coupon_buy t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.create_user_id= #{createUserId}
, t.supplier_id= #{supplierId}
, t.quantity= #{quantity}
, t.create_user_name= #{createUserName}
, t.remark= #{remark}
, t.obj_name= #{objName}
, t.coupon_id= #{couponId}
, t.store_id= #{storeId}
, t.value_price= #{valuePrice}
, t.create_user_tel= #{createUserTel}
, t.name= #{name}
, t.obj_id= #{objId}
, t.store_name= #{storeName}
where 1=1
and t.buy_id= #{buyId}