CZT
2023-09-06 71c4fa1e27f75ae4b765c95c67a3069c84dc72ba
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
package com.ld.igds.protocol.snap;
 
import com.alibaba.fastjson.JSONObject;
 
public class SnapCommand {
 
    private final static SnapCommand instance = new SnapCommand();
 
    private SnapCommand() {
    }
 
    public static SnapCommand getInstance() {
        return instance;
    }
 
 
    /**
     * 抓拍命令
     *
     * @param sn
     * @param orderId
     * @param url
     * @return
     */
    public String buildSnap(String sn, String orderId, String url) {
 
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("sn", sn);
        jsonObject.put("functionId", SnapUtils.FUNC_ID_1);
        jsonObject.put("orderId", orderId);
        jsonObject.put("sn", sn);
 
        JSONObject jsonContent = new JSONObject();
        jsonContent.put("url", url);
 
        jsonObject.put("content", jsonContent);
 
        return SnapUtils.MSG_BEGIN + jsonObject.toJSONString() + SnapUtils.MSG_END;
    }
 
}