Interface ChineseCustomerAccountService

    • Method Detail

      • generateVerificationCode

        java.lang.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​(java.lang.String mobileNumber,
                                  java.lang.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

        java.util.Optional<CustomerModel> getCustomerForMobileNumber​(java.lang.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

        java.util.Optional<MobileNumberVerificationModel> getMobileNumberVerificationCode​(java.lang.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​(java.util.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

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

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

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