From 1e0ffb4026328506fa3fe77fc6d9554dc667b681 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期五, 08 十一月 2024 16:59:02 +0800
Subject: [PATCH] 普宁配置文件
---
src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1101PR.java | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1101PR.java b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1101PR.java
index 31dff23..1a5960e 100644
--- a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1101PR.java
+++ b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1101PR.java
@@ -18,6 +18,7 @@
import com.fzzy.otherview.whhpjl.dto.WhjlApi1101;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -46,7 +47,7 @@
@DataProvider
public List<WhjlApi1101> listData() {
List<ApiInfoData> result = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1101);
- if(null == result ||result.isEmpty()){
+ if (null == result || result.isEmpty()) {
return null;
}
List<WhjlApi1101> list = new ArrayList<>();
@@ -107,30 +108,31 @@
*/
@Expose
public String pushData(List<WhjlApi1101> items) {
- ResponseDto responseDto;
+
String result = "";
String kqdm = items.get(0).getKqdm();
ApiConfs apiConf = apiCommonService.getConf(kqdm);
- if (null == apiConf) return "绯荤粺娌℃湁鑾峰彇鍒板綋鍓嶅簱鍖洪厤缃俊鎭紝鎵ц澶辫触";
+ if (null == apiConf) {
+ return "绯荤粺娌℃湁鑾峰彇鍒板綋鍓嶅簱鍖洪厤缃俊鎭紝鎵ц澶辫触";
+ }
//灏佽鍙傛暟
ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_11, WhjlConstant.API_CODE_1101);
//鑾峰彇瀹炵幇鎺ュ彛
ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
- if (null == apiService) return "绯荤粺娌℃湁褰撳墠鎺ㄩ�佸崗璁厤缃紝鎵ц澶辫触";
+ if (null == apiService) {
+ return "绯荤粺娌℃湁褰撳墠鎺ㄩ�佸崗璁厤缃紝鎵ц澶辫触";
+ }
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- responseDto = apiService.pushData(param, apiConf, items);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
-
- ApiInfoData infoData;
- for (WhjlApi1101 data : items) {
- if(Constant.CZBZ_I.equals(data.getCzbz())){
-
+ ResponseDto responseDto;
+ ApiInfoData infoData;
+ for (WhjlApi1101 data : items) {
+ responseDto = apiService.pushData(param, apiConf, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
infoData = new ApiInfoData();
infoData.setId(data.getBizId());
infoData.setKqdm(data.getKqdm());
@@ -142,7 +144,6 @@
data.setCzbz(Constant.CZBZ_U);
infoData.setCzbz(Constant.CZBZ_U);
infoData.setData(JSON.toJSONString(data));
-
apiInfoDataRep.save(infoData);
}
}
--
Gitblit v1.9.3