insert into business_resource_store(
res_name,operate,price,res_code,description,store_id,stock,b_id,res_id,goods_type,
unit_code,remark,out_low_price,out_high_price,show_mobile,create_time
) values (
#{resName},#{operate},#{price},#{resCode},#{description},#{storeId},#{stock},#{bId},#{resId},
#{goodsType},#{unitCode},#{remark},#{outLowPrice},#{outHighPrice},#{showMobile},#{createTime}
)
insert into resource_store(
res_name,price,res_code,description,status_cd,store_id,stock,b_id,res_id,goods_type,unit_code,remark,
out_low_price,out_high_price,show_mobile,create_time
) select t.res_name,t.price,t.res_code,t.description,'0',t.store_id,t.stock,t.b_id,t.res_id,t.goods_type,
t.unit_code,t.remark,t.out_low_price,t.out_high_price,t.show_mobile,t.create_time 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}
and t.goods_type= #{goodsType}
and t.unit_code= #{unitCode}
and t.remark= #{remark}
and t.out_low_price= #{outLowPrice}
and t.out_high_price= #{outHighPrice}
and t.show_mobile= #{showMobile}
and t.create_time= #{createTime}
update resource_store t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.res_name= #{resName}
, t.price= #{price}
, t.out_low_price= #{outLowPrice}
, t.out_high_price= #{outHighPrice}
, t.goods_type= #{goodsType}
, t.unit_code= #{unitCode}
, t.show_mobile= #{showMobile}
, t.remark= #{remark}
, 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}