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: *