|
@@ -292,6 +292,7 @@ public class KuaishouPopulationPackageServiceImpl extends ServiceImpl<KuaishouPo
|
|
|
if (!Check.isNull(data)) {
|
|
|
JSONArray details = data.getJSONArray("details");
|
|
|
if (details.size() > 0) {
|
|
|
+ List<KuaishouPopulationPackageRel> list = new ArrayList<>();
|
|
|
for (int j = 0; j < details.size(); j++) {
|
|
|
JSONObject obj = details.getJSONObject(j);
|
|
|
KuaishouPopulationPackageRel rel = JSONObject.parseObject(obj.toJSONString(), KuaishouPopulationPackageRel.class);
|
|
@@ -300,12 +301,15 @@ public class KuaishouPopulationPackageServiceImpl extends ServiceImpl<KuaishouPo
|
|
|
rel.setProjectId(projectId);
|
|
|
rel.setDataStatus(1);
|
|
|
rel.setStatDate(DateUtils.formatDate(new Date()));
|
|
|
- relService.save(rel);
|
|
|
+ list.add(rel);
|
|
|
} else {
|
|
|
rel.setDataStatus(1);
|
|
|
relMapper.updateStatus(rel);
|
|
|
}
|
|
|
}
|
|
|
+ if (!Check.isNull(list)) {
|
|
|
+ relMapper.replaceBatch(list);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|