From f22c2bda5fbe1e016403c6585334cac15d256f49 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 12 六月 2024 19:17:35 +0800
Subject: [PATCH] 调整石嘴山省平台配置文件信息
---
src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1206PR.java | 51 +++++++++++++++++++++++++++++----------------------
1 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1206PR.java b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1206PR.java
index 187c528..dc1316b 100644
--- a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1206PR.java
+++ b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1206PR.java
@@ -16,10 +16,13 @@
import com.fzzy.api.service.ApiRemoteService;
import com.fzzy.api.utils.ContextUtil;
import com.fzzy.api.view.repository.ApiInfoDataRep;
+import com.fzzy.otherview.gd2022.dto.GdApi1023;
+import com.fzzy.otherview.gd2022.dto.GdApi1023Way;
import com.fzzy.otherview.whhpjl.WhjlConstant;
import com.fzzy.otherview.whhpjl.dto.WhjlApi1206;
import com.fzzy.otherview.whhpjl.dto.WhjlApi1206;
import com.fzzy.otherview.whhpjl.dto.WhjlQDItem;
+import com.fzzy.push.gd2022.ApiCodeConstant;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
@@ -52,7 +55,7 @@
/**
* 鑾峰彇鍒楄〃淇℃伅
- * whjlApi1207PR#listData
+ * whjlApi1206PR#listData
*
* @return
*/
@@ -110,42 +113,46 @@
/**
* 鑾峰彇鍒楄〃淇℃伅
- * whjlApi1207PR#listItem
+ * whjlApi1206PR#listItem
*
* @return
*/
@DataProvider
- public List<WhjlQDItem> listItem(String id) {
- return null;
+ public List<WhjlQDItem> listItem(String code) {
+ return JSON.parseArray(code, WhjlQDItem.class);
}
/**
* 鏇存柊鎴栦慨鏀�
- * whjlApi1207PR#saveData
+ * whjlApi1206PR#saveData
*
* @param data
* @return
*/
@DataResolver
public void saveData(WhjlApi1206 data) {
- ApiInfoData infoData = new ApiInfoData();
- infoData.setId(data.getBizId());
- infoData.setKqdm(data.getKqdm());
- infoData.setInteType(WhjlConstant.API_CATEGORY_12);
- infoData.setInteId(WhjlConstant.API_CODE_1207);
- infoData.setUpdateTime(new Date());
- infoData.setDataId(data.getBizId());
- infoData.setData(JSON.toJSONString(data));
- infoData.setCzbz(data.getCzbz());
- infoData.setRemarks("澶囨敞淇℃伅");
-
+ ApiInfoData infoData;
+ List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(WhjlConstant.API_CODE_1206, data.getBizId(), data.getKqdm());
+ if (apiInfoList.size() != 0) {
+ infoData = apiInfoList.get(0);
+ infoData.setData(JSON.toJSONString(data));
+ } else {
+ infoData = new ApiInfoData();
+ infoData.setId(data.getBizId());
+ infoData.setKqdm(data.getKqdm());
+ infoData.setInteId(WhjlConstant.API_CODE_1206);
+ infoData.setUpdateTime(new Date());
+ infoData.setDataId(data.getBizId());
+ infoData.setData(JSON.toJSONString(data));
+ infoData.setCzbz(Constant.CZBZ_I);
+ infoData.setRemarks("澶囨敞淇℃伅");
+ }
apiInfoDataRep.save(infoData);
}
-
/**
* 鍒犻櫎
- * whjlApi1207PR#delData
+ * whjlApi1206PR#delData
*
* @param data
* @return
@@ -158,7 +165,7 @@
/**
* 鍒犻櫎鍚堝悓鍟嗗搧娓呭崟
- * whjlApi1207PR#delItem
+ * whjlApi1206PR#delItem
*
* @param data
* @return
@@ -170,7 +177,7 @@
/**
* 涓婁紶
- * whjlApi1207PR#pushData
+ * whjlApi1206PR#pushData
*
* @param items
* @return
@@ -188,7 +195,7 @@
}
//灏佽鍙傛暟
- ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_12, WhjlConstant.API_CODE_1207);
+ ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_12, WhjlConstant.API_CODE_1206);
//鑾峰彇瀹炵幇鎺ュ彛
ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
@@ -207,7 +214,7 @@
infoData.setId(data.getBizId());
infoData.setKqdm(data.getKqdm());
infoData.setInteType(WhjlConstant.API_CATEGORY_12);
- infoData.setInteId(WhjlConstant.API_CODE_1207);
+ infoData.setInteId(WhjlConstant.API_CODE_1206);
infoData.setUpdateTime(new Date());
infoData.setDataId(data.getBizId());
--
Gitblit v1.9.3