| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean mutiVerifyCode(String email, String emailCode, String phone, String phoneCode) { |
| | | if (StrUtil.isBlank(emailCode) || StrUtil.isBlank(phoneCode)) { |
| | | return false; |
| | | } |
| | | |
| | | String cacheEmailCode = redisUtils.getString(AppContants.VERIFY_CODE_PREFIX + email); |
| | | String cachePhoneCode = redisUtils.getString(AppContants.VERIFY_CODE_PREFIX + phone); |
| | | if (StrUtil.isBlank(cacheEmailCode) || StrUtil.isBlank(cachePhoneCode)) { |
| | | return false; |
| | | } |
| | | |
| | | if (emailCode.equals(cacheEmailCode) && phoneCode.equals(cachePhoneCode)) { |
| | | redisUtils.del(AppContants.VERIFY_CODE_PREFIX + email); |
| | | redisUtils.del(AppContants.VERIFY_CODE_PREFIX + phone); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public String generateOrderNo(Long mid) { |
| | | StringBuilder orderNo = new StringBuilder(); |
| | | String date = DateUtil.format(new Date(), "yyyyMMdd"); |