Browse Source

人群包

yumeng 4 years ago
parent
commit
6433781e1f

+ 11 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -3037,13 +3037,18 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
-                    JSONArray dataArr = resultJson.getJSONArray("data");
-                    if (!Check.isNull(dataArr)) {
+                    JSONObject dataDetailJson = resultJson.getJSONObject("data");
+                    if (!Check.isNull(dataDetailJson)) {
                         Map<String, Object> deleteMap = new HashMap<>();
+
+                        JSONArray details = dataDetailJson.getJSONArray("details");
+                        if (Check.isNull(details)) {
+                            return;
+                        }
                         deleteMap.put("account_id", accountId);
                         populationService.removeByMap(deleteMap);
-                        for (int i = 0; i < dataArr.size(); i++) {
-                            JSONObject dataJson = dataArr.getJSONObject(i);
+                        for (int i = 0; i < details.size(); i++) {
+                            JSONObject dataJson = details.getJSONObject(i);
                             if (!Check.isNull(dataJson)) {
                                 KuaishouPopulation population = new KuaishouPopulation();
                                 population.setOrientationId(dataJson.getLong("orientation_id"));
@@ -3077,6 +3082,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     }
 
 
+
+
     /**
      * 获取定向标签
      *