Преглед на файлове

fix(drama): 处理版权商短剧分销接口异常时的日志和错误清理

- 优化异常日志输出,直接打印接口返回的完整结果json
- 在特定错误码(3)下,删除对应的错误日志记录
- 保持原有错误添加逻辑,支持错误日志的新增和清理
- 增强异常处理的准确性和日志管理能力
hpk преди 9 месеца
родител
ревизия
2e13bd8dbc
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/service/impl/KuaiShouDramaServiceImpl.java

+ 4 - 1
job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/data/service/impl/KuaiShouDramaServiceImpl.java

@@ -263,10 +263,13 @@ public class KuaiShouDramaServiceImpl implements IKuaiShouDramaService {
         Integer code = resultJson.getInteger("code");
         String message = resultJson.getString("message");
         if (null == code || code != 0) {
-            log.error("获取快手版权商短剧分销数据查询接口异常:{},accountId:{}", message, advertiserId);
+            log.error("获取快手版权商短剧分销数据查询接口异常:{},accountId:{}", resultJson, advertiserId);
             if (isLog != null && isLog == 1 && (null == code || code != 3)) {
                 errorLogService.addError(advertiserId, startDate, endDate, "drama_saler_cr_data", "daily", new JSONObject().fluentPut("msg", message).fluentPut("seriesType", seriesType).toJSONString(), 2);
             }
+            if (code != null && code == 3 && errId != null){
+                errorLogService.deleteInfoByErrorId(errId);
+            }
             return;
         }
         JSONObject data = resultJson.getJSONObject("data");