| | |
| | | package org.jeecg.modules.dry.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.dry.entity.DryHelloEntity; |
| | | import org.jeecg.modules.dry.service.IDryHelloService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Api(tags = "dry示例") |
| | | @RestController |
| | |
| | | return jeecgHelloService.hello(); |
| | | } |
| | | |
| | | @ApiOperation(value="接收实时数据Str", notes="设备实时数据上传") |
| | | @PostMapping("/sendRealTimeData") |
| | | public Result<?> realTimeData(String orderVo) { |
| | | System.out.println("接收到实时数据:" + orderVo.toString()); |
| | | log.info("实时数据:"+ orderVo.toString()); |
| | | //service.saveRealTimeData(orderVo); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value="接收实时数据Map", notes="设备实时数据上传") |
| | | @PostMapping("/sendRealTimeDataMap") |
| | | public Result<?> realTimeDataMap(@RequestBody Map<String,Object> orderVo) { |
| | | System.out.println("接收到实时数据:" + orderVo.toString()); |
| | | log.info("实时数据:"+ orderVo.toString()); |
| | | //service.saveRealTimeData(orderVo); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value="接收实时数据Json", notes="设备实时数据上传") |
| | | @PostMapping("/sendRealTimeDataJson") |
| | | public Result<?> realTimeDataJson(@RequestBody JSONObject orderVo) { |
| | | System.out.println("接收到实时数据:" + orderVo.toJSONString()); |
| | | log.info("实时数据:"+orderVo.toJSONString()); |
| | | //service.saveRealTimeData(orderVo); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | } |