烟台政务云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

64 lines
2.1 KiB

/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 用户居民端注册信息表 用户在居民端完善的个人信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-30
*/
@Component
public class UserResiInfoRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
public void setUserResiMobileCode(String userId, String mobile, String verificationCode){
String key = RedisKeys.getResiRegisterMobileCodeKey(userId, mobile, verificationCode);
//手机验证码放入缓存中 有效时间30分钟
redisUtils.set(key, verificationCode,RedisUtils.MINUTE_THIRTY_EXPIRE);
}
public String getUserResiMobileCode(String userId, String mobile, String verificationCode){
String key = RedisKeys.getResiRegisterMobileCodeKey(userId, mobile, verificationCode);
return (String) redisUtils.get(key);
}
public void deleteOldUserMobileCode(String userId, String mobile){
String key = RedisKeys.getResiRegisterMobileCodeKey(userId, mobile);
redisUtils.deleteByPattern(key);
}
}