张世豪
昨天 00f4e4fc6e53a26cf3dc67d57d8b00536634d707
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package sendMQTT.HTTPUtils;
 
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
 
/**
 * 移动路径命令JSON结构
 */
@Data
public class MovePathCommand {
    
    @JsonProperty("msg_id")
    private String msgId;
    
    private long timestamp;
    
    @JsonProperty("user_id")
    private String userId;
    
    @JsonProperty("device_id")
    private String deviceId;
    
    private String command;
    
    private MovePathData data;
    
    public MovePathCommand() {
    }
    
    public MovePathCommand(String msgId, long timestamp, String userId, String deviceId, MovePathData data) {
        this.msgId = msgId;
        this.timestamp = timestamp;
        this.userId = userId;
        this.deviceId = deviceId;
        this.command = "movePath";
        this.data = data;
    }
    
    /**
     * 数据内部类
     */
    @Data
    public static class MovePathData {
        private String filename;
        private String filesize;
        private String url;
        
        public MovePathData() {
        }
        
        public MovePathData(String filename, String filesize, String url) {
            this.filename = filename;
            this.filesize = filesize;
            this.url = url;
        }
    }
}