|
@@ -1,5 +1,6 @@
|
|
package com.fdkankan.external.service.impl;
|
|
package com.fdkankan.external.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.util.ZipUtil;
|
|
import cn.hutool.core.util.ZipUtil;
|
|
import cn.hutool.http.HttpUtil;
|
|
import cn.hutool.http.HttpUtil;
|
|
@@ -13,6 +14,7 @@ import com.fdkankan.external.util.ScrbObsUtil;
|
|
import com.fdkankan.fyun.config.FYunFileConfig;
|
|
import com.fdkankan.fyun.config.FYunFileConfig;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -22,6 +24,7 @@ import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
+@Slf4j
|
|
@Service
|
|
@Service
|
|
public class ScrbServiceImpl implements IScrbService {
|
|
public class ScrbServiceImpl implements IScrbService {
|
|
|
|
|
|
@@ -52,10 +55,13 @@ public class ScrbServiceImpl implements IScrbService {
|
|
private ICameraService cameraService;
|
|
private ICameraService cameraService;
|
|
@Autowired
|
|
@Autowired
|
|
private ICameraDetailService cameraDetailService;
|
|
private ICameraDetailService cameraDetailService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISceneNotDisplayService sceneNotDisplayService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void packageScene(JSONObject jsonObject) {
|
|
public void packageScene(JSONObject jsonObject) {
|
|
|
|
|
|
|
|
+ log.info("日川日报推送开始,{}", jsonObject);
|
|
String num = jsonObject.getString("num");
|
|
String num = jsonObject.getString("num");
|
|
String path = basePath + num + "/";
|
|
String path = basePath + num + "/";
|
|
String sourcePath = path + num + "/";
|
|
String sourcePath = path + num + "/";
|
|
@@ -122,5 +128,15 @@ public class ScrbServiceImpl implements IScrbService {
|
|
param.put("num", num);
|
|
param.put("num", num);
|
|
param.put("key", key);
|
|
param.put("key", key);
|
|
JSONObject result = httpClient.postJson(url, param);
|
|
JSONObject result = httpClient.postJson(url, param);
|
|
|
|
+
|
|
|
|
+ //场景推送到四川日报后,在官网个人中心不展示
|
|
|
|
+ List<SceneNotDisplay> sceneNotDisplays = sceneNotDisplayService.listByNum(num);
|
|
|
|
+ if(CollUtil.isEmpty(sceneNotDisplays)){
|
|
|
|
+ SceneNotDisplay sceneNotDisplay = new SceneNotDisplay();
|
|
|
|
+ sceneNotDisplay.setNum(num);
|
|
|
|
+ sceneNotDisplayService.save(sceneNotDisplay);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ log.info("日川日报推送结果,num:{},result:{}", num, result);
|
|
}
|
|
}
|
|
}
|
|
}
|