跟新登录状态

This commit is contained in:
wangshuai 2024-07-06 16:57:06 +08:00
parent 39b0acf162
commit e570b0970b
1 changed files with 6 additions and 3 deletions

View File

@ -471,16 +471,18 @@ public class MeituanServiceImpl implements IMeituanService {
JSONObject jsonObject = JSONObject.parseObject(result); JSONObject jsonObject = JSONObject.parseObject(result);
int code = jsonObject.getInteger(("code")); int code = jsonObject.getInteger(("code"));
if (code != 0) { if (code != 0) {
System.out.println(result);
return false; return false;
} }
JSONArray array = jsonObject.getJSONObject("data").getJSONArray("list"); JSONArray array = jsonObject.getJSONObject("data").getJSONArray("list");
BusStoreDayInfo busStoreDayInfo = new BusStoreDayInfo(); BusStoreDayInfo busStoreDayInfo = new BusStoreDayInfo();
busStoreDayInfo.setStoreId(store.getId()); busStoreDayInfo.setStoreId(store.getId());
List<BusStoreDayInfo> list1 = busStoreDayInfoService.selectBusStoreDayInfoList(busStoreDayInfo); List<BusStoreDayInfo> list1 = busStoreDayInfoService.selectBusStoreDayInfoList(busStoreDayInfo);
if (list1.size() > 0) { if (list1.size() == 1) {
BusStoreDayInfo busStoreDayInfo1 = new BusStoreDayInfo(); BusStoreDayInfo busStoreDayInfo1 = new BusStoreDayInfo();
int fiveNum = array.getJSONObject(array.size()).getInteger("fiveNum"); int fiveNum = array.getJSONObject(array.size()-1).getInteger("fiveNum");
int fourNum = array.getJSONObject(array.size()).getInteger("fourNum"); int fourNum = array.getJSONObject(array.size()-1).getInteger("fourNum");
busStoreDayInfo1.setId(list1.get(0).getId());
busStoreDayInfo1.setLastFiveStarReviewsNum(fiveNum); busStoreDayInfo1.setLastFiveStarReviewsNum(fiveNum);
busStoreDayInfo1.setLastPositiveReviewsNum(fiveNum + fourNum); busStoreDayInfo1.setLastPositiveReviewsNum(fiveNum + fourNum);
busStoreDayInfoService.updateBusStoreDayInfo(busStoreDayInfo1); busStoreDayInfoService.updateBusStoreDayInfo(busStoreDayInfo1);
@ -488,6 +490,7 @@ public class MeituanServiceImpl implements IMeituanService {
System.out.println(jsonObject);//落库 System.out.println(jsonObject);//落库
return true; return true;
} catch (Exception e) { } catch (Exception e) {
System.out.println(e.getMessage());
return false; return false;
// e.printStackTrace(); // e.printStackTrace();
} }