insert into coupon_property_pool(
coupon_name,to_type,from_type,validity_day,cpp_id,community_name,state,community_id,stock,from_id,remark
) values (
#{couponName},#{toType},#{fromType},#{validityDay},#{cppId},#{communityName},#{state},#{communityId},#{stock},#{fromId},#{remark}
)
update coupon_property_pool t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.coupon_name= #{couponName}
, t.to_type= #{toType}
, t.from_type= #{fromType}
, t.validity_day= #{validityDay}
, t.community_name= #{communityName}
, t.state= #{state}
, t.community_id= #{communityId}
, t.stock= #{stock}
, t.from_id= #{fromId}
, t.remark= #{remark}
where 1=1
and t.cpp_id= #{cppId}