Skip to content

Commit

Permalink
fix:门店id配置信息
Browse files Browse the repository at this point in the history
  • Loading branch information
oddfar committed Aug 4, 2023
1 parent f683425 commit 372ec14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public R add(@RequestBody IUser iUser) {
if (iShop == null) {
throw new ServiceException("门店商品id不存在");
}
iUser.setLng(iShop.getLng());
iUser.setLat(iShop.getLat());
iUser.setProvinceName(iShop.getProvinceName());
iUser.setCityName(iShop.getCityName());

return R.ok(iUserService.insertIUser(iUser));
}
Expand All @@ -134,6 +138,10 @@ public R edit(@RequestBody IUser iUser) {
if (iShop == null) {
throw new ServiceException("门店商品id不存在");
}
iUser.setLng(iShop.getLng());
iUser.setLat(iShop.getLat());
iUser.setProvinceName(iShop.getProvinceName());
iUser.setCityName(iShop.getCityName());
return R.ok(iUserService.updateIUser(iUser));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,13 @@ public List<IMTItemInfo> getShopsByProvince(String province, String itemId) {
try {
res = JSONObject.parseObject(urlRes);
} catch (JSONException jsonException) {
logger.info(url);
throw new ServiceException("查询所在省市的投放产品和数量error," + province + "-" + itemId);
}

// JSONObject res = JSONObject.parseObject(HttpUtil.get(url));
if (!res.containsKey("code") || !res.getString("code").equals("2000")) {
logger.info(url);
logger.error("查询所在省市的投放产品和数量error," + province + "-" + itemId);
throw new ServiceException("查询所在省市的投放产品和数量error," + province + "-" + itemId);
}
Expand Down

0 comments on commit 372ec14

Please sign in to comment.