From 84e6dc37bf0079f14fa4f69e892ece977d8b785f Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期三, 25 十月 2023 12:13:05 +0800 Subject: [PATCH] 类名修改 --- src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1108PR.java | 55 ++++++++++++++++++++++++++++++------------------------- 1 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1106PR.java b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1108PR.java similarity index 77% rename from src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1106PR.java rename to src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1108PR.java index 2bc6043..172370a 100644 --- a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1106PR.java +++ b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1108PR.java @@ -15,7 +15,7 @@ import com.fzzy.api.service.ApiRemoteService; import com.fzzy.api.view.repository.ApiInfoDataRep; import com.fzzy.otherview.whhpjl.WhjlConstant; -import com.fzzy.otherview.whhpjl.dto.WhjlApi1106; +import com.fzzy.otherview.whhpjl.dto.WhjlApi1108; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -24,12 +24,13 @@ import java.util.List; /** - * 寤掗棿淇℃伅 + * 璐т綅淇℃伅 * * @Author:YAN */ @Component -public class WhjlApi1106PR { +public class WhjlApi1108PR { + @Autowired private ApiCommonService apiCommonService; @@ -40,43 +41,43 @@ /** * 鑾峰彇鍒楄〃淇℃伅 - * whjlApi1106PR#listData + * whjlApi1107PR#listData * * @return */ @DataProvider - public List<WhjlApi1106> listData() { - List<ApiInfoData> result = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1106); + public List<WhjlApi1108> listData() { + List<ApiInfoData> result = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1107); if (null == result || result.isEmpty()) { return null; } - List<WhjlApi1106> list = new ArrayList<>(); - WhjlApi1106 whjlApi1106; + List<WhjlApi1108> list = new ArrayList<>(); + WhjlApi1108 whjlApi1107; for (ApiInfoData infoData : result) { - whjlApi1106 = JSONObject.parseObject(infoData.getData(), WhjlApi1106.class); - whjlApi1106.setKqdm(infoData.getKqdm()); - whjlApi1106.setCzbz(infoData.getCzbz()); - whjlApi1106.setUpdateTime(infoData.getUpdateTime()); - whjlApi1106.setBizId(infoData.getDataId()); - list.add(whjlApi1106); + whjlApi1107 = JSONObject.parseObject(infoData.getData(), WhjlApi1108.class); + whjlApi1107.setKqdm(infoData.getKqdm()); + whjlApi1107.setCzbz(infoData.getCzbz()); + whjlApi1107.setUpdateTime(infoData.getUpdateTime()); + whjlApi1107.setBizId(infoData.getDataId()); + list.add(whjlApi1107); } return list; } /** * 鏇存柊鎴栦慨鏀� - * whjlApi1106PR#saveData + * whjlApi1107PR#saveData * * @param data * @return */ @DataResolver - public void saveData(WhjlApi1106 data) { + public void saveData(WhjlApi1108 data) { ApiInfoData infoData = new ApiInfoData(); infoData.setId(data.getBizId()); infoData.setKqdm(data.getKqdm()); infoData.setInteType(WhjlConstant.API_CATEGORY_11); - infoData.setInteId(WhjlConstant.API_CODE_1106); + infoData.setInteId(WhjlConstant.API_CODE_1107); infoData.setUpdateTime(new Date()); infoData.setDataId(data.getBizId()); infoData.setData(JSON.toJSONString(data)); @@ -88,26 +89,26 @@ /** * 鍒犻櫎 - * whjlApi1106PR#delData + * whjlApi1107PR#delData * * @param data * @return */ @Expose - public String delData(WhjlApi1106 data) { + public String delData(WhjlApi1108 data) { apiInfoDataRep.deleteById(data.getBizId()); return null; } /** * 涓婁紶 - * whjlApi1106PR#pushData + * whjlApi1107PR#pushData * * @param items * @return */ @Expose - public String pushData(List<WhjlApi1106> items) { + public String pushData(List<WhjlApi1108> items) { String result = ""; @@ -119,7 +120,7 @@ } //灏佽鍙傛暟 - ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_11, WhjlConstant.API_CODE_1106); + ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_11, WhjlConstant.API_CODE_1107); //鑾峰彇瀹炵幇鎺ュ彛 ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); @@ -127,9 +128,13 @@ return "绯荤粺娌℃湁褰撳墠鎺ㄩ�佸崗璁厤缃紝鎵ц澶辫触"; } - ResponseDto responseDto; + //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮� + + + //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵�� ApiInfoData infoData; - for (WhjlApi1106 data : items) { + ResponseDto responseDto; + for (WhjlApi1108 data : items) { responseDto = apiService.pushData(param, apiConf, data); if (responseDto.getSuccess() == 0) { if (Constant.CZBZ_I.equals(data.getCzbz())) { @@ -138,7 +143,7 @@ infoData.setId(data.getBizId()); infoData.setKqdm(data.getKqdm()); infoData.setInteType(WhjlConstant.API_CATEGORY_11); - infoData.setInteId(WhjlConstant.API_CODE_1106); + infoData.setInteId(WhjlConstant.API_CODE_1107); infoData.setUpdateTime(new Date()); infoData.setDataId(data.getBizId()); -- Gitblit v1.9.3