自写了个sql,尝试增加"白蛇鳞"到商城,工具增加成功了,但在采办的时辰,可采办熟练显现为0,加不了,这个怎样破
sql:
declare @maxid int,@additemid int,@addname varchar(50)
set @additemid=830313
set @addname='白蛇鳞'
select @maxid=MAX(GoodsId)+1 from Goods
select @maxid
insert into Goods (GoodsId,GoodsName,GoodsAppGroupCode,GoodsType,DeliveryType,SaleStatus,EffectiveFrom,EffectiveTo,SaleableQuantity,RefundUnitCode,IsRefundable,IsAvailableRecurringPayment,Changed,ChangerAdminAccount,GoodsDescription,GoodsData,GoodsPurchaseType,GoodsPurchaseCheckMask) select @maxid,@addname,GoodsAppGroupCode,GoodsType,DeliveryType,SaleStatus,EffectiveFrom,EffectiveTo,SaleableQuantity,RefundUnitCode,IsRefundable,IsAvailableRecurringPayment,Changed,ChangerAdminAccount,@addname,GoodsData,GoodsPurchaseType,GoodsPurchaseCheckMask from Goods where GoodsId=52107
insert INTO GoodsItems(GoodsId,ItemId,ItemQuantity,ItemExpirationType,ItemData,DeliveryPriority) select @maxid,@additemid,100,ItemExpirationType,ItemData,DeliveryPriority from GoodsItems where GoodsId=52107
insert into GoodsCategories(GoodsId,CategoryId,DisplayOrder) select @maxid,CategoryId,DisplayOrder from GoodsCategories where GoodsId=52107
insert into GoodsBasicPrices(GoodsId,CurrencyGroupId,BasicSalePrice,RefundFee) select @maxid,CurrencyGroupId,BasicSalePrice,RefundFee from GoodsBasicPrices where GoodsId=52107
insert into GoodsItemBasicPrices(GoodsId,ItemId,CurrencyGroupId,BasicSalePrice) select @maxid,@additemid,CurrencyGroupId,BasicSalePrice from GoodsItemBasicPrices where GoodsId=52107
insert into GoodsSalePricePolicies(GoodsId,CurrencyGroupId,PricePolicyType,EffectiveFrom,EffectiveTo,SalePrice) select @maxid,CurrencyGroupId,PricePolicyType,EffectiveFrom,EffectiveTo,SalePrice from GoodsSalePricePolicies where GoodsId=52107
insert into GoodsDisplay(GoodsId,LanguageCode,GoodsDisplayName,GoodsDisplayDescription) select @maxid,LanguageCode,@addname,@addname from GoodsDisplay where GoodsId=52107
|