手机归属地缓存时间改为7天

This commit is contained in:
苏竹红
2023-06-30 17:15:53 +08:00
parent 58bda47c16
commit 7e84f6d8f6

View File

@@ -50,7 +50,8 @@ public class HyPhoneLocationServiceImpl implements HyPhoneLocationService {
hy.setPhoneNumber(phoneNumber); hy.setPhoneNumber(phoneNumber);
hy.setPhoneAddress(String.format("%s %s", phoneNumberAttribute.getProvince(), phoneNumberAttribute.getCity())); hy.setPhoneAddress(String.format("%s %s", phoneNumberAttribute.getProvince(), phoneNumberAttribute.getCity()));
hyPhoneLocationDAO.insertSelective(hy); hyPhoneLocationDAO.insertSelective(hy);
redisUtilPool.setString(redisConstantUtil.getPhoneNumber(phoneNumber),JSONObject.toJSONString(phoneNumberAttribute),24*60*60); //redis一周时间
redisUtilPool.setString(redisConstantUtil.getPhoneNumber(phoneNumber),JSONObject.toJSONString(phoneNumberAttribute),7*24*60*60);
return hy.getPhoneAddress(); return hy.getPhoneAddress();
} }
return hyPhoneLocationDO.getPhoneAddress(); return hyPhoneLocationDO.getPhoneAddress();