xiangpei
2024-11-12 0b5a5d7bfce9fb3b773fcc0b406bb3a7e309107e
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/sync/VideoPulSync.java
@@ -2,6 +2,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.DateUtils;
import org.dromara.common.oss.core.OssClient;
import org.dromara.common.oss.entity.SynchronousRequest;
@@ -43,7 +44,7 @@
        this.baseMapper = baseMapper;
    }
//    @Scheduled(cron = "0 0/1 * * * ?")
    @Scheduled(cron = "0 0/1 * * * ?")
    public void get() throws IOException {
        System.out.println("同步上传......");
@@ -98,7 +99,7 @@
    private String post(SynchronousRequest request, byte[] bytes) throws IOException {
        HashMap<String, String> headers = new HashMap<>(3);
        String requestUrl = boundary.getVideo() +  "/resource/synchronization/upload";
        String requestUrl = boundary.getLocalhost() +  "/resource/synchronization/upload";
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
        headers.put("content-type", "application/json");