From ded40ebbd1613490fc68190dbd92db5d7243267f Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 22 八月 2023 16:25:20 +0800
Subject: [PATCH] 优化代码
---
service-api/src/main/java/com/java110/api/controller/app/smartWeter/NotifySmartMeterController.java | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/service-api/src/main/java/com/java110/api/controller/app/smartWeter/NotifySmartMeterController.java b/service-api/src/main/java/com/java110/api/controller/app/smartWeter/NotifySmartMeterController.java
index 9ccbfd0..054134f 100644
--- a/service-api/src/main/java/com/java110/api/controller/app/smartWeter/NotifySmartMeterController.java
+++ b/service-api/src/main/java/com/java110/api/controller/app/smartWeter/NotifySmartMeterController.java
@@ -1,5 +1,6 @@
package com.java110.api.controller.app.smartWeter;
+import com.alibaba.fastjson.JSONObject;
import com.java110.core.base.controller.BaseController;
import com.java110.core.log.LoggerFactory;
import com.java110.dto.meter.NotifyMeterWaterOrderDto;
@@ -26,6 +27,48 @@
* @param request
* @throws Exception
*/
+ @RequestMapping(path = "/{implBean}", method = RequestMethod.POST)
+ public ResponseEntity<String> notifyTq(
+ @PathVariable String implBean,
+ @RequestBody String postInfo,
+ HttpServletRequest request) {
+ String appId = "992020051967020024";
+
+ JSONObject paramIn = new JSONObject();
+ for (String key : request.getParameterMap().keySet()) {
+ paramIn.put(key, request.getParameter(key));
+ logger.debug("鎷撳己鍥炶皟鎶ユ枃form" + key + ":: " + request.getParameter(key));
+ }
+ logger.debug("鎷撳己鍥炶皟鎶ユ枃" + paramIn.toJSONString());
+
+ //todo 涓哄暐鍐欑殑杩欎箞鎸� 鍥犱负鎷撳己鐨勭數琛� 鍥炶皟璺緞澶暱 浠栦細澶辫触
+ switch (implBean) {
+ case "a":
+ implBean = "tqDianBiaoDanxiangDanFeiLvFactoryAdaptImpl";
+ break;
+ case "b":
+ implBean = "tqDianBiaoRemoteDanFeiLvPreFactoryAdaptImpl";
+ break;
+ case "c":
+ implBean = "tqShuiBiaoLoraReadFactoryAdaptImpl";
+ break;
+ case "d":
+ implBean = "tqShuiBiaoLoraRechargeFactoryAdaptImpl";
+ break;
+ default:
+ }
+
+
+ return notifySmartWeterV1InnerServiceSMOImpl.notifySmartMater(new NotifyMeterWaterOrderDto(appId, paramIn.toJSONString(), implBean));
+
+ }
+
+ /**
+ * <p>鏀粯鍥炶皟Api</p>
+ *
+ * @param request
+ * @throws Exception
+ */
@RequestMapping(path = "/{implBean}/{appId}", method = RequestMethod.POST)
public ResponseEntity<String> notify(
@PathVariable String implBean,
--
Gitblit v1.8.0