insert into product_detail(
product_id,detail_id,store_id,content
) values (
#{productId},#{detailId},#{storeId},#{content}
)
update product_detail t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.content= #{content}
where 1=1
and t.detail_id= #{detailId}
and t.product_id= #{productId}
and t.store_id= #{storeId}