ReceiveDataController.java
739 Bytes
package com.viontech.controller;
import com.viontech.service.TransferService;
import com.viontech.vo.FxData;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
//@RestController
//@RequestMapping("/api/v1/gb1400_recv")
public class ReceiveDataController {
@Resource
private TransferService transferService;
@PostMapping(value = "/event_data", name = "接收繁星数据")
@ResponseBody
public Object saveData(@RequestBody FxData eventData) throws Exception {
transferService.receiveData(eventData);
Map map=new HashMap();
map.put("code", "200");
map.put("note", "success");
return map;
}
}