USE [ShippingWeb_HC_CS_20200624] GO /****** Object: View [dbo].[Vw_Sys_User] Script Date: 2020/8/20 17:45:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO alter view [dbo].[Vw_Sys_User] as select b.HOMEADDRESS Address,1 Apptype,u.MODIFIEDTIME AuditDate,1 AuditStatus,'超级管理员' Auditor ,u.ENROLLTIME CreateDate,u.CREATEUSER CreateID,'超级管理员' Createor ,vu.DeptName,vu.deptgid Dept_Id,b.EMAIL1 Email,case when u.ISDELETED ='true' then 0 else 1 end as Enable ,1 Gender,b.IMAGEURL HeadImageUrl,0 IsRegregisterPhone,null LastLoginDate,null LastModifyPwdDate ,b.Mobile,u.MODIFIEDUSER Modifier,u.MODIFIEDTIME ModifyDate ,u.Role_Id Role_Id ,r.RoleName RoleName ,b.OFFICEPHONE PhoneNo ,b.Remark ,b.HOMEPHONE Tel,u.CODENAME UserName,u.PASSWORD UserPwd,u.SHOWNAME UserTrueName,u.Token,Convert(uniqueidentifier, U.gid) User_Id ,vu.COMPANYID CompanyId,vu.companyname CompanyName,(select codename from company where gid=vu.COMPANYID) CompanyCodeName from [user] u left join user_baseinfo b on b.USERID=u.GID left join vw_user vu on vu.USERID=u.gid left join Sys_Role_Core r on r.Role_Id=u.Role_Id GO alter table Sys_Dictionary alter column CreateID uniqueidentifier null alter table Sys_Dictionary alter column ModifyID uniqueidentifier null alter table Sys_DictionaryList alter column CreateID uniqueidentifier null alter table Sys_DictionaryList alter column ModifyID uniqueidentifier null alter table Sys_TableColumn alter column CreateID uniqueidentifier null alter table Sys_TableColumn alter column ModifyID uniqueidentifier null alter table sys_log_core alter column CreateID uniqueidentifier null update Sys_TableColumn set ColumnType='guid' where ColumnName='CreateID' and TableName='Sys_Dictionary' update Sys_TableColumn set ColumnType='guid' where ColumnName='ModifyID' and TableName='Sys_Dictionary' update Sys_TableColumn set ColumnType='guid' where ColumnName='CreateID' and TableName='Sys_DictionaryList' update Sys_TableColumn set ColumnType='guid' where ColumnName='ModifyID' and TableName='Sys_DictionaryList' update Sys_Dictionary set CreateID='1BEC90E1-9780-472F-90C2-0C6390C044A4' where CreateID is null update Sys_Dictionary set ModifyID='1BEC90E1-9780-472F-90C2-0C6390C044A4' where ModifyID is null update Sys_DictionaryList set CreateID='1BEC90E1-9780-472F-90C2-0C6390C044A4' where CreateID is null update Sys_DictionaryList set ModifyID='1BEC90E1-9780-472F-90C2-0C6390C044A4' where ModifyID is null