<BD>
	<sql ver="1">
		--初始密码123456
		insert into [dbo].[UserInfo] (id,CreateTime,CreateUserID,CreateUserName,Account,UserName,Sex,DeptID,DeptName,PostID,PostName,WorkNo,CellPhoneNum,TelPhoneNum,Remake,PassWord,IsAdmin,PowerLevel,IsLeaving,IsDelete,CreationTime) values ('816226B1-6FA4-43BB-8BC5-EE41BD521FC3','2020-12-20','816226B1-6FA4-43BB-8BC5-EE41BD521FC3','admin','admin','超级管理员','1','','','','','00000001','17858852533','','超级管理员','4QrcOUm6Wau+VuBX8g+IPg','1','','0','0','2020-12-20');
	</sql>
	<sql ver="2"> 
		--创建图库列表的视图
		CREATE VIEW ViewGalleryInformation
		AS
		SELECT a.Id,
		a.CreateTime,
		a.CreateUserID,
		a.CreateUserName,
		a.UpdateTime,
		a.UpdateUserID,
		a.UpdateUserName,
		a.GalleryNum,
		a.Remark,
		a.IsDelete,
		a.CreationTime,
		COUNT(b.Id) AS FilesCount
		FROM GalleryInformation AS a
		LEFT JOIN
		(SELECT * FROM GalleryFiles WHERE IsDelete != 1) AS b
		ON a.Id = b.GalleryInformationID
		WHERE a.IsDelete != 1
		GROUP BY a.Id,
		a.CreateTime,
		a.CreateUserID,
		a.CreateUserName,
		a.UpdateTime,
		a.UpdateUserID,
		a.UpdateUserName,
		a.GalleryNum,
		a.Remark,
		a.IsDelete,
		a.CreationTime;
	</sql>
</BD>