|
@@ -3,7 +3,9 @@ package cn.com.ctop.job.kuaishou.handler;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
|
+import cn.com.ctop.kuaishou.modules.ai.entity.KuaishouPopulationPackageRel;
|
|
import cn.com.ctop.kuaishou.modules.ai.mapper.KuaishouPopulationPackageMapper;
|
|
import cn.com.ctop.kuaishou.modules.ai.mapper.KuaishouPopulationPackageMapper;
|
|
|
|
+import cn.com.ctop.kuaishou.modules.ai.mapper.KuaishouPopulationPackageRelMapper;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouPopulationService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouPopulationService;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -25,6 +27,8 @@ public class CrowdListQueryJob {
|
|
private IKuaishouPopulationService iKuaishouPopulationService;
|
|
private IKuaishouPopulationService iKuaishouPopulationService;
|
|
@Autowired
|
|
@Autowired
|
|
private KuaishouPopulationPackageMapper KuaishouPopulationPackageMapper;
|
|
private KuaishouPopulationPackageMapper KuaishouPopulationPackageMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private KuaishouPopulationPackageRelMapper relMapper;
|
|
static ExecutorService executorService = Executors.newFixedThreadPool(3);
|
|
static ExecutorService executorService = Executors.newFixedThreadPool(3);
|
|
|
|
|
|
@XxlJob("crowdListQueryJob")
|
|
@XxlJob("crowdListQueryJob")
|
|
@@ -48,7 +52,8 @@ public class CrowdListQueryJob {
|
|
if (details.size() > 0) {
|
|
if (details.size() > 0) {
|
|
for (int j = 0; j < details.size(); j++) {
|
|
for (int j = 0; j < details.size(); j++) {
|
|
JSONObject obj = details.getJSONObject(j);
|
|
JSONObject obj = details.getJSONObject(j);
|
|
- KuaishouPopulationPackageMapper.updateStatus(obj.getLong("account_id"), obj.getLong("orientation_id"), obj.getInteger("status"));
|
|
|
|
|
|
+ KuaishouPopulationPackageRel rel = JSONObject.parseObject(obj.toJSONString(), KuaishouPopulationPackageRel.class);
|
|
|
|
+ relMapper.updateStatus(rel);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|