/// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public UserContract AddUser(UserContract user)
        {
            user.UserId = Guid.NewGuid();
            var entity = user.MapTo <UserEntity>();

            entity.CreateTime = DateTime.Now;
            entity.Secretkey  = SecurityHelper.GetSha256Hash(WatchHelper.CreateNo(), 16).ToLower();
            entity.Password   = SecurityHelper.GetSha256Hash(DesEncrypt.Encrypt(SecurityHelper.GetSha256Hash(user.Password, 32).ToLower(), entity.Secretkey).ToLower(), 32).ToLower();
            this._db.User.Add(entity);
            this._db.SaveChanges();
            return(user);
        }