From 426f50baf57ae5901a6b5a26d1567e3b270d2499 Mon Sep 17 00:00:00 2001 From: zhuguifei <312353457@qq.com> Date: 星期三, 20 十一月 2024 10:46:38 +0800 Subject: [PATCH] 完善租户故障解析接口,完成实时故障和历史故障上报云服务器 --- jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryHelloController.java | 37 ++++++++++++++++++++++++++++++++++--- 1 files changed, 34 insertions(+), 3 deletions(-) diff --git a/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryHelloController.java b/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryHelloController.java index 0c8ad96..413d7dd 100644 --- a/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryHelloController.java +++ b/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryHelloController.java @@ -1,14 +1,16 @@ 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 @@ -26,4 +28,33 @@ 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(); + } } -- Gitblit v1.9.3