文件名从 src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1111PR.java 修改 |
| | |
| | | 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.WhjlApi1111; |
| | | import com.fzzy.otherview.whhpjl.dto.WhjlApi1112; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | * @Author:YAN |
| | | */ |
| | | @Component |
| | | public class WhjlApi1111PR { |
| | | public class WhjlApi1112PR { |
| | | |
| | | |
| | | @Autowired |
| | |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<WhjlApi1111> listData() { |
| | | public List<WhjlApi1112> listData() { |
| | | List<ApiInfoData> result = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1111); |
| | | if (null == result || result.isEmpty()) { |
| | | return null; |
| | | } |
| | | List<WhjlApi1111> list = new ArrayList<>(); |
| | | WhjlApi1111 whjlApi1111; |
| | | List<WhjlApi1112> list = new ArrayList<>(); |
| | | WhjlApi1112 whjlApi1111; |
| | | for (ApiInfoData infoData : result) { |
| | | whjlApi1111 = JSONObject.parseObject(infoData.getData(), WhjlApi1111.class); |
| | | whjlApi1111 = JSONObject.parseObject(infoData.getData(), WhjlApi1112.class); |
| | | whjlApi1111.setKqdm(infoData.getKqdm()); |
| | | whjlApi1111.setCzbz(infoData.getCzbz()); |
| | | whjlApi1111.setUpdateTime(infoData.getUpdateTime()); |
| | |
| | | * @return |
| | | */ |
| | | @DataResolver |
| | | public void saveData(WhjlApi1111 data) { |
| | | public void saveData(WhjlApi1112 data) { |
| | | ApiInfoData infoData = new ApiInfoData(); |
| | | infoData.setId(data.getBizId()); |
| | | infoData.setKqdm(data.getKqdm()); |
| | |
| | | * @return |
| | | */ |
| | | @Expose |
| | | public String delData(WhjlApi1111 data) { |
| | | public String delData(WhjlApi1112 data) { |
| | | apiInfoDataRep.deleteById(data.getBizId()); |
| | | return null; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Expose |
| | | public String pushData(List<WhjlApi1111> items) { |
| | | public String pushData(List<WhjlApi1112> items) { |
| | | |
| | | String result = ""; |
| | | |
| | |
| | | |
| | | ApiInfoData infoData; |
| | | ResponseDto responseDto; |
| | | for (WhjlApi1111 data : items) { |
| | | for (WhjlApi1112 data : items) { |
| | | responseDto = apiService.pushData(param, apiConf, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |