From ac283de347bbd06a76cac575e63b1e36c0abaa70 Mon Sep 17 00:00:00 2001 From: tuyp Date: Tue, 6 Jun 2023 21:43:26 +0800 Subject: [PATCH] 补贴培训第3次上课熬夜改数据 --- src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java | 82 +++++++++++++++++++++++++++++++++++++++++----------------------------------------- src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java | 13 ++++++------- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java b/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java index 5b8abd7..8daca4b 100644 --- a/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java @@ -102,26 +102,26 @@ public class RenSheJuServiceImpl implements RenSheJuService { System.out.println(JSONObject.fromObject(classBaseInfoDTO).toString()); - RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classBaseInfoDTO).toString()); - Request request = new Request.Builder() - .url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClass") - .method("POST", body) - .addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)") - .addHeader("Content-Type", "application/json") - .build(); - Response response = client.newCall(request).execute(); - - RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class); - RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); - renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_2); - renshejuHistoryDO.setInputParam(JSONObject.fromObject(classBaseInfoDTO).toString()); - if (200 == response.code()) { - renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString()); - } else { - renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR); - } - renshejuHistoryMapper.insert(renshejuHistoryDO); - return rensheResponseVO; +// RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classBaseInfoDTO).toString()); +// Request request = new Request.Builder() +// .url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClass") +// .method("POST", body) +// .addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)") +// .addHeader("Content-Type", "application/json") +// .build(); +// Response response = client.newCall(request).execute(); +// +// RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class); +// RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); +// renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_2); +// renshejuHistoryDO.setInputParam(JSONObject.fromObject(classBaseInfoDTO).toString()); +// if (200 == response.code()) { +// renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString()); +// } else { +// renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR); +// } +// renshejuHistoryMapper.insert(renshejuHistoryDO); +// return rensheResponseVO; // return null; } else { RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); @@ -217,27 +217,27 @@ public class RenSheJuServiceImpl implements RenSheJuService { System.out.println(com.alibaba.fastjson.JSONObject.toJSONString(classHourBehaviorDTO)); if (classHourBasics.size()>0){ - RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classHourBehaviorDTO).toString()); - - Request request = new Request.Builder() - .url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClassHourBehavior") - .method("POST", body) - .addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)") - .addHeader("Content-Type", "application/json") - .build(); - Response response = client.newCall(request).execute(); - - RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class); - RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); - renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3); - renshejuHistoryDO.setInputParam(JSONObject.fromObject(classHourBehaviorDTO).toString()); - if (200 == response.code()) { - renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString()); - } else { - renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR); - } - renshejuHistoryMapper.insert(renshejuHistoryDO); - return rensheResponseVO; +// RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(classHourBehaviorDTO).toString()); +// +// Request request = new Request.Builder() +// .url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadClassHourBehavior") +// .method("POST", body) +// .addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)") +// .addHeader("Content-Type", "application/json") +// .build(); +// Response response = client.newCall(request).execute(); +// +// RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class); +// RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); +// renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3); +// renshejuHistoryDO.setInputParam(JSONObject.fromObject(classHourBehaviorDTO).toString()); +// if (200 == response.code()) { +// renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString()); +// } else { +// renshejuHistoryDO.setOutputParam(RenSheJuConstant.API_ERROR); +// } +// renshejuHistoryMapper.insert(renshejuHistoryDO); +// return rensheResponseVO; }else { RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_3); diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index a5a2d25..85c04be 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -669,7 +669,6 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl0){ -// List telephones = Arrays.asList(new String[]{"15201936167", "18201963812", "18217669021"}); -// for (String telephone : telephones){ -// smsUtils.sendWarning("SMS_460945631", telephone, result.toString()); -// } -// } + if (result.size()>0){ + List telephones = Arrays.asList(new String[]{"15201936167", "18201963812", "18217669021"}); + for (String telephone : telephones){ + smsUtils.sendWarning("SMS_460945631", telephone, result.toString()); + } + } } //19为基数的话,3次签到6.5到8,4次签到4.8-6, -- libgit2 0.25.0