Interface ChineseCustomerAccountService

All Superinterfaces:
CustomerAccountService
All Known Implementing Classes:
DefaultChineseCustomerAccountService

public interface ChineseCustomerAccountService extends CustomerAccountService
Extended to support more function.
  • Method Details

    • generateVerificationCode

      String generateVerificationCode()
      Generates a verification code.
      Returns:
      Verification Code
    • sendVerificationCode

      void sendVerificationCode(VerificationData data)
      Sends verification code.
      Parameters:
      data - the data that contains sending info.
    • sendVerificationCode

      void sendVerificationCode(String mobileNumber, String verificationCode)
      Sends verification code.
      Parameters:
      mobileNumber - the mobile number to send the verification code
      verificationCode - the verification code for the mobile number
    • updateMobileNumber

      void updateMobileNumber(CustomerModel customerModel)
      Updates customer's mobile number.
      Parameters:
      customerModel - customer to be updated
    • getCustomerForMobileNumber

      Optional<CustomerModel> getCustomerForMobileNumber(String mobileNumber)
      Finds a customer by using mobile number.
      Parameters:
      mobileNumber - the number to query
      Returns:
      an Optional containing the customer, or an empty Optional if no customer is found.
    • getMobileNumberVerificationCode

      Optional<MobileNumberVerificationModel> getMobileNumberVerificationCode(String mobileNumber)
      Gets mobile number verification code.
      Parameters:
      mobileNumber - the number to query
      Returns:
      an Optional containing the mobile number and verification code.
    • isVerificationCodeExpired

      boolean isVerificationCodeExpired(Date date)
      Checks whether the verification code is expired.
      Parameters:
      date - the verification code generate time
      Returns:
      true if the verification code is expired
    • findExpiredVerificationCode

      List<MobileNumberVerificationModel> findExpiredVerificationCode(Date expiredDate)
      Gets all expired verification codes.
      Parameters:
      expiredDate - expired date
      Returns:
      all expired verification codes
    • getVerificationCodeExpiredDate

      Date getVerificationCodeExpiredDate()
      Gets verification code expired date.
      Returns:
      verification code expired date
    • getDefaultEmailLanguage

      String getDefaultEmailLanguage()
      Gets the default email language.
      Returns:
      default email language