From 2a7212a6e91321d45f81b0ca64c6247899202377 Mon Sep 17 00:00:00 2001 From: qyx <565485304@qq.com> Date: Thu, 22 Apr 2021 01:52:05 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD](master):?= =?UTF-8?q?=20=E6=96=B0=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=9C=9F=E6=8B=A8?= =?UTF-8?q?=E9=BC=A0AB=E5=8D=95=E6=8E=A8=E9=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yuyou/openapi/openapi/api/ABClient.java | 21 ++- .../openapi/openapi/common/ResponseCode.java | 16 ++- .../openapi/dao/ABMessageRepository.java | 4 + .../openapi/dao/TuBoShuMessageRepository.java | 31 +++++ .../openapi/dao/YHMessageRepository.java | 6 + .../model/convert/ABMessageConverter.java | 46 +++++++ .../model/dataobject/TuBoShuMessageDO.java | 81 ++++++++++++ .../model/dto/TuBoShuMessageCovDTO.java | 89 +++++++++++++ .../openapi/model/pojo/QiZhuangDTO.java | 3 + .../openapi/model/pojo/TuBoShuDTO.java | 26 ++++ .../openapi/service/ABClientService.java | 8 ++ .../openapi/service/ABMessageService.java | 8 +- .../service/impl/ABClientServiceImpl.java | 22 ++++ .../service/impl/ABClientServiceProxy.java | 5 + .../service/impl/ABMessageServiceImpl.java | 29 ++++- .../openapi/openapi/task/ABDownTask.java | 122 ++++++++++++++++++ src/main/resources/application.yml | 37 ++++-- src/main/resources/logback.xml | 4 +- .../openapi/OpenapiApplicationTest.java | 34 +++++ .../com/yuyou/openapi/openapi/RepushTest.java | 86 ++++++++++++ .../com/yuyou/openapi/openapi/SimpleTest.java | 16 +++ 21 files changed, 671 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/yuyou/openapi/openapi/dao/TuBoShuMessageRepository.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/dataobject/TuBoShuMessageDO.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/dto/TuBoShuMessageCovDTO.java create mode 100644 src/main/java/com/yuyou/openapi/openapi/model/pojo/TuBoShuDTO.java diff --git a/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java b/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java index d321f6c..4c5b9b9 100644 --- a/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java +++ b/src/main/java/com/yuyou/openapi/openapi/api/ABClient.java @@ -168,6 +168,23 @@ public class ABClient { CommonResponse.createBySuccess() : CommonResponse.createByErrorMessage("调用失败请重试"); } + /** + * 获取上游公司的AB数据推送接口 - 推送到土拨鼠家装 + * + * @return 返回调用信息 + */ + @PostMapping("/api/req/taginfo/tuboshu") + @ResponseBody + public CommonResponse getDBTagInfoTuBoShu(@RequestBody ABClientInterMessageVO vo) { + // 记录日志 + log.info("====== [ tuboshu request comming, request content is {} ] ======", vo.toString()); + // 转换实体类映射 + List dtos = ABMessageConverter.convertABMessageDTOFromVO(vo); + // 调用业务处理接口 返回校验成功的结果 + return abClientService.recordAndSendABClientMsgTuBoShu(dtos) ? + CommonResponse.createBySuccess() : CommonResponse.createByErrorMessage("调用失败请重试"); + } + /** * 获取上游公司的AB数据推送接口 - 推送到影虎小课包 * @@ -295,7 +312,7 @@ public class ABClient { */ @PostMapping("/api/resend") @ResponseBody - public CommonResponse reSend(@RequestParam String startPushTime, @RequestParam String endPushTime){ + public CommonResponse reSend(@RequestParam String startPushTime, @RequestParam String endPushTime,@RequestParam(required= false) String actName){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date startDate = null; Date endDate = null; @@ -305,7 +322,7 @@ public class ABClient { } catch (ParseException e) { log.error("parse error! error msg is : {} ", e.getMessage(),e); } - List dtos = abMessageService.queryUnSendMessage(startDate, endDate); + List dtos = abMessageService.queryUnSendMessage(startDate, endDate, actName); if (CollectionUtils.isEmpty(dtos)){ return CommonResponse.createByErrorMessage("error"); } diff --git a/src/main/java/com/yuyou/openapi/openapi/common/ResponseCode.java b/src/main/java/com/yuyou/openapi/openapi/common/ResponseCode.java index 5162e31..6b2ee92 100644 --- a/src/main/java/com/yuyou/openapi/openapi/common/ResponseCode.java +++ b/src/main/java/com/yuyou/openapi/openapi/common/ResponseCode.java @@ -2,22 +2,32 @@ package com.yuyou.openapi.openapi.common; /** * FileName: ResponseCode - * Author: x * Date: 2019/12/11 20:30 * Description: 自定义Response响应返回体 -> 这边采用的是 * History: *