Commit 3aca0f10 by songyinghui

Merge branch 'feature-content2' into developer

parents d7232ada 8ba683a1
......@@ -194,9 +194,9 @@ public class MaterialDataStaticsController {
List<String> tempStoreIds = storeUsedData.getResult()
.stream()
.map(MaterialStoreUsedDataVO::getStoreId)
.distinct()
.collect(Collectors.toList());
List<StoreDTO> storeDTOS = storeService.queryStore(tempStoreIds);
String[] storeIdsArry = new String[tempStoreIds.size()];
List<StoreDTO> storeDTOS = storeService.getStores(tempStoreIds.toArray(storeIdsArry));
if (CollectionUtils.isNotEmpty(storeDTOS)) {
Map<String, StoreDTO> storeInfoMap = storeDTOS.stream()
.collect(Collectors.toMap(StoreDTO::getStoreId, Function.identity(), (v1, v2) -> v1));
......
......@@ -427,13 +427,22 @@ public class MaterialDataAdaptor {
materialAreaUsedDataVO.setEndTime(endTime);
return materialAreaUsedDataVO;
}
List<MaterialAreaUsedDataVO> areaUsedDataVOS = JSON.parseArray(JSON.toJSONString(result.get("data")), MaterialAreaUsedDataVO.class);
if (CollectionUtils.isEmpty(areaUsedDataVOS)) {
List<JSONObject> jsonObjects = JSON.parseArray(JSON.toJSONString(result.get("data")), JSONObject.class);
if (CollectionUtils.isEmpty(jsonObjects)) {
MaterialAreaUsedDataVO materialAreaUsedDataVO = new MaterialAreaUsedDataVO();
materialAreaUsedDataVO.setStartTime(startTime);
materialAreaUsedDataVO.setEndTime(endTime);
return materialAreaUsedDataVO;
}
List<MaterialAreaUsedDataVO> areaUsedDataVOS = jsonObjects.stream()
.map(item -> {
MaterialAreaUsedDataVO temp = JSONObject.parseObject(item.toJSONString(), MaterialAreaUsedDataVO.class);
temp.setDayAvgUseRate(item.getBigDecimal("dayAvgUseBindProportion"));
temp.setClickUserNum(item.getInteger("userClickNum"));
temp.setConvSalesNmt(item.getBigDecimal("convSalesAmt"));
return temp;
})
.collect(Collectors.toList());
MaterialAreaUsedDataVO materialAreaUsedDataVO = areaUsedDataVOS.get(0);
materialAreaUsedDataVO.setStartTime(startTime);
materialAreaUsedDataVO.setEndTime(endTime);
......
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