智慧保安后台管理-外网
Administrator
2022-04-26 6934ffe9ae5aa3e0096a7028d3b70b07e08294aa
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
package org.springblade.modules.FTP;
 
import org.springblade.core.tool.api.R;
import org.springblade.modules.system.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import javax.annotation.PostConstruct;
import java.util.Arrays;
import java.util.List;
 
/**
 * ftp 数据处理
 * @author zhongrj
 * @since 2022-04-26
 */
@Component
public class DataHandler {
 
    @Autowired
    private IUserService userService;
 
    //申明对象
    private static DataHandler handler;
 
    /**
     * 初始化
     */
    @PostConstruct
    public void init(){
        handler = this;
        handler.userService = this.userService;
    }
 
    /**
     * 数据处理
     * @param json json 字符串
     * @param uuid 随机字符串
     * @return
     */
    public static R handler(String json, String uuid){
        //读取数据
        List<String> list = Arrays.asList(json.split(";"));
        list.forEach(s -> {
            System.out.println("s = " + s);
        });
        return R.data(400,null,"未能找到对应数据");
    }
}