数据库篇之存储过程[bsp_createorder](非官方版本)

差异如图:

更新语句如下:

DROP PROCEDURE [bsp_createorder]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [bsp_createorder]
			@osn char(30)
           ,@uid int
           ,@orderstate tinyint
           ,@productamount decimal(18,2)
           ,@orderamount decimal(18,2)
           ,@surplusmoney decimal(18,2)
           ,@parentid int
           ,@isreview tinyint
           ,@addtime datetime
           ,@shipsn char(30)
           ,@shipsystemname char(20)
           ,@shipfriendname nchar(30)
           ,@shiptime datetime
           ,@paysn char(30)
           ,@paysystemname char(20)
           ,@payfriendname nchar(30)
           ,@paymode tinyint
           ,@paytime datetime
           ,@regionid smallint
           ,@consignee nvarchar(20)
           ,@mobile varchar(15)
           ,@phone varchar(12)
           ,@email varchar(50)
           ,@zipcode char(6)
           ,@address nvarchar(150)
           ,@besttime datetime
           ,@shipfee decimal(18,2)
           ,@payfee decimal(18,2)
           ,@fullcut int
           ,@discount decimal(18,2)
           ,@paycreditcount int
           ,@paycreditmoney decimal(18,2)
           ,@couponmoney int
           ,@weight int
           ,@buyerremark nvarchar(250)
           ,@ip varchar(15)
AS
BEGIN
	SET NOCOUNT ON;
	DECLARE @oid int;
	INSERT INTO [bsp_orders]
           ([osn]
		   ,[uid]
		   ,[orderstate]
		   ,[productamount]
		   ,[orderamount]
		   ,[surplusmoney]
		   ,[parentid]
		   ,[isreview]
		   ,[addtime]
		   ,[shipsn]
		   ,[shipsystemname]
		   ,[shipfriendname]
		   ,[shiptime]
		   ,[paysn]
		   ,[paysystemname]
		   ,[payfriendname]
		   ,[paymode]
		   ,[paytime]
		   ,[regionid]
		   ,[consignee]
		   ,[mobile]
		   ,[phone]
		   ,[email]
		   ,[zipcode]
		   ,[address]
		   ,[besttime]
		   ,[shipfee]
		   ,[payfee]
		   ,[fullcut]
		   ,[discount]
		   ,[paycreditcount]
		   ,[paycreditmoney]
		   ,[couponmoney]
		   ,[weight]
		   ,[buyerremark]
		   ,[ip])
     VALUES
           (@osn
		   ,@uid
		   ,@orderstate
		   ,@productamount
		   ,@orderamount
		   ,@surplusmoney
		   ,@parentid
		   ,@isreview
		   ,@addtime
		   ,@shipsn
		   ,@shipsystemname
		   ,@shipfriendname
		   ,@shiptime
		   ,@paysn
		   ,@paysystemname
		   ,@payfriendname
		   ,@paymode
		   ,@paytime
		   ,@regionid
		   ,@consignee
		   ,@mobile
		   ,@phone
		   ,@email
		   ,@zipcode
		   ,@address
		   ,@besttime
		   ,@shipfee
		   ,@payfee
		   ,@fullcut
		   ,@discount
		   ,@paycreditcount
		   ,@paycreditmoney
		   ,@couponmoney
		   ,@weight
		   ,@buyerremark
		   ,@ip)
    SET @oid=SCOPE_IDENTITY();
	SELECT @oid AS 'oid';
END
GO


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值