Commit dbf9ab07 by 吴博

Merge branch 'fixbug/fixip' into 'master'

bug:[none] fixip

See merge request rays/pcloud-book!1137
parents d631d13e 54430a02
......@@ -452,12 +452,13 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
ipDataMapper.insert(ipData);
} catch (Exception e) {
log.error("获取ip失败,ip:{}", bookBrowseRecord.getIp());
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "获取ip失败");
}
}
bookBrowseRecord.setProvince(ipData.getRegion());
bookBrowseRecord.setProvinceCode(ipData.getRegionId());
bookBrowseRecord.setCity(ipData.getCity());
bookBrowseRecord.setCityCode(ipData.getCityId());
if (null != ipData) {
bookBrowseRecord.setProvince(ipData.getRegion());
bookBrowseRecord.setProvinceCode(ipData.getRegionId());
bookBrowseRecord.setCity(ipData.getCity());
bookBrowseRecord.setCityCode(ipData.getCityId());
}
}
}
\ No newline at end of file
......@@ -75,8 +75,7 @@ public class IpDataBizImpl implements IpDataBiz {
ipDataMapper.insert(ipData);
} catch (Exception e) {
log.error("获取ip失败,ip:{}", ipAddress);
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "获取ip失败");
}
}
}
return ipData;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment