修复BUG:SaveUsers存储过程没有更新,补充上一个提交
This commit is contained in:
parent
3e465ca0d8
commit
9ea25ec00e
|
@ -189,13 +189,16 @@ BEGIN
|
||||||
-- Insert statements for procedure here
|
-- Insert statements for procedure here
|
||||||
if @userStatus = 2
|
if @userStatus = 2
|
||||||
begin
|
begin
|
||||||
update Users set ApprovedTime = GETDATE() where ID = @id
|
update Users set ApprovedTime = GETDATE(), ApprovedBy = @approvedBy where ID = @id
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
declare @approveTime datetime = null
|
declare @approveTime datetime = null
|
||||||
if @userStatus = 0 set @approveTime = GETDATE()
|
if @userStatus = 0 set @approveTime = GETDATE()
|
||||||
Insert Into Users (UserName, [Password], PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, [Description]) values (@userName, @password, @passSalt, @displayName, GETDATE(), @approveTime, @approvedBy, @description)
|
if(@id = 0)
|
||||||
|
Insert Into Users (UserName, [Password], PassSalt, DisplayName, RegisterTime, ApprovedTime, [Description]) values (@userName, @password, @passSalt, @displayName, GETDATE(), @approveTime, @description)
|
||||||
|
else
|
||||||
|
Update Users set UserName = @userName, Password = @password, PassSalt = @passSalt, DisplayName = @displayName where ID = @id
|
||||||
end
|
end
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
Loading…
Reference in New Issue