Process.java
969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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;
}