Process.java 969 Bytes
package com.viontech.process;

import com.alibaba.fastjson.JSONObject;
import com.viontech.model.BaseModel;
import com.viontech.utils.DateUtil;
import com.viontech.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;

/**
 * .
 *
 * @author 谢明辉
 * @date 2020/8/20
 */
public interface Process {
    Logger LOGGER = LoggerFactory.getLogger(Process.class);

    static String getFileFTPPath(Date date, String deviceId, String fileName) {
        String yyyyMMdd = DateUtil.format("yyyyMMdd", date);
        String ip;
        try {
            ip = Utils.INSTANCE.getIpAddress();
        } catch (Exception e) {
            ip = "null";
            LOGGER.error("", e);
        }
        return "12401/video/" + yyyyMMdd + "/" + ip + "/" + deviceId + "/" + fileName;
    }

    static byte[] downloadFile(String url) {


        return new byte[]{};
    }

    BaseModel process(JSONObject jsonObject) throws Exception;


}