|
|
@@ -1,5 +1,6 @@
|
|
|
package com.mokamrp.privates.task.pangu;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
|
|
|
import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
|
|
|
@@ -57,8 +58,22 @@ public class SyncFosterwxCash {
|
|
|
public void syncCreatedUrlInfo() {
|
|
|
String urlInfo = taskRedis.getPanguCashTaskInfo();
|
|
|
while (urlInfo != null) {
|
|
|
+ log.info("typer生成的链接信息{}", urlInfo);
|
|
|
// 根据获取的信息保存到本地数据库
|
|
|
- // TODO 需要根据typer返回的redis结构具体生成
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(urlInfo);
|
|
|
+ if ("success".equals(jsonObject.get("status"))) {
|
|
|
+ fosterwxCashScheduleTaskListService.updateById(new FosterwxCashScheduleTaskList() {{
|
|
|
+ setId(Integer.valueOf(jsonObject.get("automatic_id").toString()));
|
|
|
+ setSendUrl(jsonObject.get("article_url").toString());
|
|
|
+ setStatus(2);
|
|
|
+ }});
|
|
|
+ } else {
|
|
|
+ fosterwxCashScheduleTaskListService.updateById(new FosterwxCashScheduleTaskList() {{
|
|
|
+ setId(Integer.valueOf(jsonObject.get("automatic_id").toString()));
|
|
|
+ setErrInfo(jsonObject.get("ret_message").toString());
|
|
|
+ setStatus(3);
|
|
|
+ }});
|
|
|
+ }
|
|
|
|
|
|
urlInfo = taskRedis.getPanguCashTaskInfo();
|
|
|
}
|