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 { ...@@ -452,12 +452,13 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
ipDataMapper.insert(ipData); ipDataMapper.insert(ipData);
} catch (Exception e) { } catch (Exception e) {
log.error("获取ip失败,ip:{}", bookBrowseRecord.getIp()); log.error("获取ip失败,ip:{}", bookBrowseRecord.getIp());
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "获取ip失败");
} }
} }
if (null != ipData) {
bookBrowseRecord.setProvince(ipData.getRegion()); bookBrowseRecord.setProvince(ipData.getRegion());
bookBrowseRecord.setProvinceCode(ipData.getRegionId()); bookBrowseRecord.setProvinceCode(ipData.getRegionId());
bookBrowseRecord.setCity(ipData.getCity()); bookBrowseRecord.setCity(ipData.getCity());
bookBrowseRecord.setCityCode(ipData.getCityId()); bookBrowseRecord.setCityCode(ipData.getCityId());
} }
}
} }
\ No newline at end of file
...@@ -75,7 +75,6 @@ public class IpDataBizImpl implements IpDataBiz { ...@@ -75,7 +75,6 @@ public class IpDataBizImpl implements IpDataBiz {
ipDataMapper.insert(ipData); ipDataMapper.insert(ipData);
} catch (Exception e) { } catch (Exception e) {
log.error("获取ip失败,ip:{}", ipAddress); log.error("获取ip失败,ip:{}", ipAddress);
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "获取ip失败");
} }
} }
return ipData; 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