public IdentifyCodeOutput GenerateIdentifyCode(string account, AccountRegistType accountType) { var identifyCode = _identifyCodeQueryService.GetIdentifyCode(account); var code = RandomHelper.GenerateIdentifyCode(); var output = new IdentifyCodeOutput { IdentifyCodeId = identifyCode == null?Guid.NewGuid().ToString() : identifyCode.Id, Code = code, ExpirationDate = DateTime.Now.AddMinutes(_identifyCodeDuration), IsNew = identifyCode == null, }; return(output); }
public UserInfo( string id, string userName, string email, string phone, string password, bool isActive, ClientRegistType clientRegistType, AccountRegistType accountRegistType, int points ) : base(id) { UserName = userName; Email = email; Phone = phone; Password = password; IsActive = isActive; ClientRegistType = clientRegistType; CreateTime = DateTime.Now; IsDelete = false; AccountRegistType = accountRegistType; Points = points; Balance = 0; TotalRecharge = 0; TotalConsumeAccount = 0; PointCount = 0; AmountCount = 0; ApplyEvent(new AddUserInfoEvent(UserName, Email, Phone, Password, IsActive, ClientRegistType, IsDelete, AccountRegistType, Points, Balance, TotalRecharge, TotalConsumeAccount, PointCount, AmountCount )); }
public AddUserInfoEvent(string userName, string email, string phone, string password, bool isActive, ClientRegistType clientRegistType, bool isDelete, AccountRegistType accountRegistType, int points) { UserName = userName; Email = email; Phone = phone; Password = password; IsActive = isActive; ClientRegistType = clientRegistType; CreateTime = DateTime.Now; IsDelete = isDelete; AccountRegistType = accountRegistType; Points = points; }
public AddUserInfoEvent(string userName, string email, string phone, string password, bool isActive, ClientRegistType clientRegistType, bool isDelete, AccountRegistType accountRegistType, int points, int balance, int totalRecharge, int totalConsumeAccount, int pointCount, int amountCount) { UserName = userName; Email = email; Phone = phone; Password = password; IsActive = isActive; ClientRegistType = clientRegistType; CreateTime = DateTime.Now; IsDelete = isDelete; AccountRegistType = accountRegistType; Points = points; TotalRecharge = totalConsumeAccount; TotalConsumeAccount = totalConsumeAccount; AmountCount = amountCount; Balance = balance; PointCount = pointCount; }
public AddUserInfoCommand(string id, string account, string password, ClientRegistType clientRegistType, AccountRegistType accountRegistType, int points) : base(id) { switch (accountRegistType) { case AccountRegistType.UserName: UserName = account; break; case AccountRegistType.Email: Email = account; break; case AccountRegistType.Phone: Phone = account; break; } AccountRegistType = accountRegistType; Password = password; ClientRegistType = clientRegistType; Points = points; }
private string EncryptPassword(string userAccount, string userPassword, AccountRegistType accountRegType) { var pwd = Hash.Create(HashType.MD5, userAccount + userPassword, accountRegType.ToString(), true); return(pwd); }