insert into business_resource_store( res_name,operate,price,res_code,description,store_id,stock,b_id,res_id ) values ( #{resName},#{operate},#{price},#{resCode},#{description},#{storeId},#{stock},#{bId},#{resId} ) insert into resource_store( res_name,price,res_code,description,status_cd,store_id,stock,b_id,res_id ) select t.res_name,t.price,t.res_code,t.description,'0',t.store_id,t.stock,t.b_id,t.res_id from business_resource_store t where 1=1 and t.res_name= #{resName} and t.operate= 'ADD' and t.price= #{price} and t.res_code= #{resCode} and t.description= #{description} and t.store_id= #{storeId} and t.stock= #{stock} and t.b_id= #{bId} and t.res_id= #{resId} update resource_store t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.res_name= #{resName} , t.price= #{price} , t.res_code= #{resCode} , t.description= #{description} , t.store_id= #{storeId} , t.stock= #{stock} where 1=1 and t.b_id= #{bId} and t.res_id= #{resId}