跟新登录状态
This commit is contained in:
parent
39b0acf162
commit
e570b0970b
|
@ -471,16 +471,18 @@ public class MeituanServiceImpl implements IMeituanService {
|
|||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
int code = jsonObject.getInteger(("code"));
|
||||
if (code != 0) {
|
||||
System.out.println(result);
|
||||
return false;
|
||||
}
|
||||
JSONArray array = jsonObject.getJSONObject("data").getJSONArray("list");
|
||||
BusStoreDayInfo busStoreDayInfo = new BusStoreDayInfo();
|
||||
busStoreDayInfo.setStoreId(store.getId());
|
||||
List<BusStoreDayInfo> list1 = busStoreDayInfoService.selectBusStoreDayInfoList(busStoreDayInfo);
|
||||
if (list1.size() > 0) {
|
||||
if (list1.size() == 1) {
|
||||
BusStoreDayInfo busStoreDayInfo1 = new BusStoreDayInfo();
|
||||
int fiveNum = array.getJSONObject(array.size()).getInteger("fiveNum");
|
||||
int fourNum = array.getJSONObject(array.size()).getInteger("fourNum");
|
||||
int fiveNum = array.getJSONObject(array.size()-1).getInteger("fiveNum");
|
||||
int fourNum = array.getJSONObject(array.size()-1).getInteger("fourNum");
|
||||
busStoreDayInfo1.setId(list1.get(0).getId());
|
||||
busStoreDayInfo1.setLastFiveStarReviewsNum(fiveNum);
|
||||
busStoreDayInfo1.setLastPositiveReviewsNum(fiveNum + fourNum);
|
||||
busStoreDayInfoService.updateBusStoreDayInfo(busStoreDayInfo1);
|
||||
|
@ -488,6 +490,7 @@ public class MeituanServiceImpl implements IMeituanService {
|
|||
System.out.println(jsonObject);//落库
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
return false;
|
||||
// e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue