手机号未知
This commit is contained in:
@@ -45,14 +45,18 @@ public class HyPhoneLocationServiceImpl implements HyPhoneLocationService {
|
||||
}
|
||||
HyPhoneLocationDO hyPhoneLocationDO = hyPhoneLocationDAO.selectByPhoneNumber(phoneNumber);
|
||||
if (hyPhoneLocationDO==null){
|
||||
DescribePhoneNumberDTO phoneNumberAttribute = aliyunService.getPhoneNumberAttribute(phoneNumber);
|
||||
HyPhoneLocationDO hy = new HyPhoneLocationDO();
|
||||
hy.setPhoneNumber(phoneNumber);
|
||||
hy.setPhoneAddress(String.format("%s %s", phoneNumberAttribute.getProvince(), phoneNumberAttribute.getCity()));
|
||||
hyPhoneLocationDAO.insertSelective(hy);
|
||||
//redis一周时间
|
||||
redisUtilPool.setString(redisConstantUtil.getPhoneNumber(phoneNumber),JSONObject.toJSONString(phoneNumberAttribute),7*24*60*60);
|
||||
return hy.getPhoneAddress();
|
||||
try {
|
||||
DescribePhoneNumberDTO phoneNumberAttribute = aliyunService.getPhoneNumberAttribute(phoneNumber);
|
||||
HyPhoneLocationDO hy = new HyPhoneLocationDO();
|
||||
hy.setPhoneNumber(phoneNumber);
|
||||
hy.setPhoneAddress(String.format("%s %s", phoneNumberAttribute.getProvince(), phoneNumberAttribute.getCity()));
|
||||
hyPhoneLocationDAO.insertSelective(hy);
|
||||
//redis一周时间
|
||||
redisUtilPool.setString(redisConstantUtil.getPhoneNumber(phoneNumber),JSONObject.toJSONString(phoneNumberAttribute),7*24*60*60);
|
||||
return hy.getPhoneAddress();
|
||||
}catch (Exception e){
|
||||
return "未知";
|
||||
}
|
||||
}
|
||||
return hyPhoneLocationDO.getPhoneAddress();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user