public void ChangeStatus( [NotNull] TUserExtension user, SnsStatusType statusType) { Check.NotNull(user, nameof(user)); // user.ChangeStatus(statusType); }
public void ChangeLogo( [NotNull] TUserExtension user, [NotNull] string logo) { Check.NotNull(user, nameof(user)); Check.NotNullOrWhiteSpace(logo, nameof(logo)); // user.ChangeLogo(logo); }
public void ChangeDisplayName( [NotNull] TUserExtension user, [NotNull] string displayName) { Check.NotNull(user, nameof(user)); Check.NotNullOrWhiteSpace(displayName, nameof(displayName)); // user.ChangeDisplayName(displayName); }
public async Task ChangeBusinessNameAsync( [NotNull] TUserExtension user, [NotNull] string newBusinessName) { Check.NotNull(user, nameof(user)); Check.NotNullOrWhiteSpace(newBusinessName, nameof(newBusinessName)); // var existingUser = await _userExtRepository.CheckBusinessNameAsync(user.UserId, newBusinessName); if (existingUser != null) { throw new UserBusinessNameAlreadyExistsException(newBusinessName); } // user.ChangeBusinessName(newBusinessName); }
public async Task ChangeSocialCreditCodeAsync( [NotNull] TUserExtension user, [NotNull] string newSocialCreditCode, [NotNull] string newSocialCreditCodeImg) { Check.NotNull(user, nameof(user)); Check.NotNullOrWhiteSpace(newSocialCreditCode, nameof(newSocialCreditCode)); Check.NotNullOrWhiteSpace(newSocialCreditCodeImg, nameof(newSocialCreditCodeImg)); // var existingUser = await _userExtRepository.CheckSocialCreditCodeAsync(user.UserId, newSocialCreditCode); if (existingUser != null) { throw new UserSocialCreditCodeAlreadyExistsException(newSocialCreditCode); } // user.ChangeSocialCreditCode(newSocialCreditCode, newSocialCreditCodeImg); }
public async Task ChangeIdentityCardAsync( [NotNull] TUserExtension user, [NotNull] string newIdentityCardNo, [NotNull] string newIdentityCardImg, [NotNull] string newIdentityCardName) { Check.NotNull(user, nameof(user)); Check.NotNullOrWhiteSpace(newIdentityCardNo, nameof(newIdentityCardNo)); Check.NotNullOrWhiteSpace(newIdentityCardImg, nameof(newIdentityCardImg)); Check.NotNullOrWhiteSpace(newIdentityCardName, nameof(newIdentityCardName)); // var existingUser = await _userExtRepository.CheckIdentityCardAsync(user.UserId, newIdentityCardNo); if (existingUser != null) { throw new UserIdentityCardAlreadyExistsException(newIdentityCardNo); } // user.ChangeIdentityCard(newIdentityCardNo, newIdentityCardImg, newIdentityCardName); }