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,"未能找到对应数据");
|
}
|
}
|