From 19195e70c3c1e0a66ce39a40dffe66ee2b1ae9e8 Mon Sep 17 00:00:00 2001 From: danmo <775144922@qq.com> Date: Tue, 10 Sep 2024 11:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=88=BF=E5=AD=90=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=97=B4=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dyj/applet/DyAppletClient.java | 75 ++++++- .../applet/client/AptDataAnalysisClient.java | 51 ++++- .../dyj/applet/domain/LiveWithShortData.java | 160 ++++++++++++++ .../dyj/applet/domain/SmallHomeOrderData.java | 144 +++++++++++++ .../applet/domain/SmallHomeOverviewData.java | 185 ++++++++++++++++ .../dyj/applet/domain/SmallHomeRoomData.java | 197 ++++++++++++++++++ .../domain/query/LiveWithShortIdQuery.java | 162 ++++++++++++++ .../applet/domain/vo/LiveWithShortIdVo.java | 31 +++ .../domain/vo/SmallHomeOrderDataVo.java | 70 +++++++ .../domain/vo/SmallHomeOverviewDataVo.java | 41 ++++ .../applet/domain/vo/SmallHomeRoomDataVo.java | 68 ++++++ .../handler/AptDataAnalysisHandler.java | 143 ++++++++++--- 12 files changed, 1287 insertions(+), 40 deletions(-) create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/LiveWithShortData.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOrderData.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOverviewData.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeRoomData.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/query/LiveWithShortIdQuery.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/vo/LiveWithShortIdVo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOrderDataVo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOverviewDataVo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeRoomDataVo.java diff --git a/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java b/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java index 4b15a52..ee918f8 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java @@ -2687,8 +2687,8 @@ public class DyAppletClient extends BaseClient { * @param query 短视频投稿数据参数 * @return DySimpleResult */ - public DySimpleResult queryShortLiveIdWithAwemeId(ShortLiveIdWithAwemeIdQuery query){ - return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryShortLiveIdWithAwemeId(query); + public DySimpleResult queryShortIdWithAwemeId(ShortLiveIdWithAwemeIdQuery query){ + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryShortIdWithAwemeId(query); } @@ -2706,8 +2706,8 @@ public class DyAppletClient extends BaseClient { * @param query 视频数据查询参数 * @return DySimpleResult */ - public DySimpleResult queryShortLiveDataWithId(ShortLiveDataWithIdQuery query){ - return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryShortLiveDataWithId(query); + public DySimpleResult queryShortDataWithId(ShortLiveDataWithIdQuery query){ + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryShortDataWithId(query); } /** @@ -2718,4 +2718,71 @@ public class DyAppletClient extends BaseClient { public DySimpleResult queryVideoWithSource(AnalysisVideoSourceQuery query){ return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryVideoWithSource(query); } + + + /** + * 直播投稿数据 + * + * @param query 直播投稿数据参数 + * @return DySimpleResult + */ + public DySimpleResult queryLiveWithAwemeId(ShortLiveIdWithAwemeIdQuery query) { + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryLiveWithAwemeId(query); + } + + + /** + * 直播间详细数据 + * + * @param query 直播间详细数据查询参数 + * @return DySimpleResult + */ + public DySimpleResult queryLiveDataWithId(ShortLiveDataWithIdQuery query) { + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryLiveDataWithId(query); + } + + /** + * 主播分析 + * + * @param query 主播分析参数 + * @return DySimpleResult + */ + DySimpleResult queryLiveWithShortId(LiveWithShortIdQuery query) { + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryLiveWithShortId(query); + } + + /** + * 小房子直播间总览数据 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @return DySimpleResult + */ + public DySimpleResult querySmallHomeOverviewData(Long startTime, Long endTime) { + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).querySmallHomeOverviewData(startTime, endTime); + } + + /** + * 小房子直播间详细数据 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @return DySimpleResult + */ + public DySimpleResult querySmallHomeRoomData(Long startTime, Long endTime) { + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).querySmallHomeRoomData(startTime, endTime); + } + + /** + * 小房子直播间订单数据 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @param pageNum 分页编号,从 0 开始 + * @param pageSize 分页大小,小于等于 1000,大于1000的默认取最大值1000 + * @return DySimpleResult + */ + public DySimpleResult querySmallHomeOrderData(Long startTime, Long endTime, Integer pageNum, Integer pageSize) { + return new AptDataAnalysisHandler(configuration().getAgentByTenantId(tenantId, clientKey)).querySmallHomeOrderData(startTime, endTime, pageNum, pageSize); + } } \ No newline at end of file diff --git a/dy-java-applet/src/main/java/com/dyj/applet/client/AptDataAnalysisClient.java b/dy-java-applet/src/main/java/com/dyj/applet/client/AptDataAnalysisClient.java index 1530e4d..3c9ffa3 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/client/AptDataAnalysisClient.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/client/AptDataAnalysisClient.java @@ -1,10 +1,7 @@ package com.dyj.applet.client; import com.dtflys.forest.annotation.*; -import com.dyj.applet.domain.query.AnalysisVideoDataQuery; -import com.dyj.applet.domain.query.AnalysisVideoSourceQuery; -import com.dyj.applet.domain.query.ShortLiveDataWithIdQuery; -import com.dyj.applet.domain.query.ShortLiveIdWithAwemeIdQuery; +import com.dyj.applet.domain.query.*; import com.dyj.applet.domain.vo.*; import com.dyj.common.domain.DySimpleResult; import com.dyj.common.domain.query.BaseQuery; @@ -227,4 +224,50 @@ public interface AptDataAnalysisClient { */ @Post(value = "/api/platform/v2/data_analysis/query_video_with_source/", interceptor = ClientTokenInterceptor.class) DySimpleResult queryVideoWithSource(@JSONBody AnalysisVideoSourceQuery query); + + //****************直播分析****************************** + + /** + * 主播分析 + * @param query 主播分析参数 + * @return DySimpleResult + */ + @Post(value = "/api/platform/v2/data_analysis/query_live_with_short_id/", interceptor = ClientTokenInterceptor.class) + DySimpleResult queryLiveWithShortId(@JSONBody LiveWithShortIdQuery query); + + + + //****************小房子直播分析****************************** + + /** + * 小房子直播间总览数据 + * @param query 小房子直播间总览数据参数 + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @return DySimpleResult + */ + @Get(value = "/api/platform/v2/data_analysis/query_small_home_overview_data/", interceptor = ClientTokenInterceptor.class) + DySimpleResult querySmallHomeOverviewData(@Var("query") BaseQuery query, @Query("start_time") Long startTime, @Query("end_time") Long endTime); + + /** + * 小房子直播间详细数据 + * @param query 小房子直播间详细数据参数 + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @return DySimpleResult + */ + @Get(value = "/api/platform/v2/data_analysis/query_small_home_room_data/", interceptor = ClientTokenInterceptor.class) + DySimpleResult querySmallHomeRoomData(@Var("query") BaseQuery query, @Query("start_time") Long startTime, @Query("end_time") Long endTime); + + /** + * 小房子直播间订单数据 + * @param query 小房子直播间订单数据参数 + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @param pageNum 分页编号,从 0 开始 + * @param pageSize 分页大小,小于等于 1000,大于1000的默认取最大值1000 + * @return DySimpleResult + */ + @Get(value = "/api/platform/v2/data_analysis/query_small_home_order_data/", interceptor = ClientTokenInterceptor.class) + DySimpleResult querySmallHomeOrderData(@Var("query") BaseQuery query, @Query("start_time") Long startTime, @Query("end_time") Long endTime, @Query("page_num") Integer pageNum, @Query("page_size") Integer pageSize); } diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/LiveWithShortData.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/LiveWithShortData.java new file mode 100644 index 0000000..b40cca3 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/LiveWithShortData.java @@ -0,0 +1,160 @@ +package com.dyj.applet.domain; + + +public class LiveWithShortData { + + private ShortData Data; + + private ShortInfo ShortInfo; + + public static class ShortData{ + /** + * 客单价 + */ + private Long CustomerOncePrice; + /** + * 支付人数 + */ + private Long PayCustomerCnt; + /** + * 支付订单金额 + */ + private Long PayOrderAmount; + /** + * 直播总时长,单位:秒 + */ + private Long RoomDuration; + /** + * 最高在线人数 + */ + private Long RoomHighestOnlineCount; + /** + * 新增粉丝数 + */ + private Long RoomNewFans; + /** + * 直播场次 + */ + private Long RoomSessionCnt; + /** + * + * 曝光-观看率 + */ + private Long RoomWatchRate; + + public Long getCustomerOncePrice() { + return CustomerOncePrice; + } + + public void setCustomerOncePrice(Long customerOncePrice) { + CustomerOncePrice = customerOncePrice; + } + + public Long getPayCustomerCnt() { + return PayCustomerCnt; + } + + public void setPayCustomerCnt(Long payCustomerCnt) { + PayCustomerCnt = payCustomerCnt; + } + + public Long getPayOrderAmount() { + return PayOrderAmount; + } + + public void setPayOrderAmount(Long payOrderAmount) { + PayOrderAmount = payOrderAmount; + } + + public Long getRoomDuration() { + return RoomDuration; + } + + public void setRoomDuration(Long roomDuration) { + RoomDuration = roomDuration; + } + + public Long getRoomHighestOnlineCount() { + return RoomHighestOnlineCount; + } + + public void setRoomHighestOnlineCount(Long roomHighestOnlineCount) { + RoomHighestOnlineCount = roomHighestOnlineCount; + } + + public Long getRoomNewFans() { + return RoomNewFans; + } + + public void setRoomNewFans(Long roomNewFans) { + RoomNewFans = roomNewFans; + } + + public Long getRoomSessionCnt() { + return RoomSessionCnt; + } + + public void setRoomSessionCnt(Long roomSessionCnt) { + RoomSessionCnt = roomSessionCnt; + } + + public Long getRoomWatchRate() { + return RoomWatchRate; + } + + public void setRoomWatchRate(Long roomWatchRate) { + RoomWatchRate = roomWatchRate; + } + } + + public static class ShortInfo{ + /** + * 账号类型,0-非企业号,1-企业号 + */ + private Integer AccountType; + /** + * 抖音头像 + */ + private String Avat; + /** + * 抖音号 + */ + private String AwemeShortID; + /** + * 抖音昵称 + */ + private String Nickname; + + public Integer getAccountType() { + return AccountType; + } + + public void setAccountType(Integer accountType) { + AccountType = accountType; + } + + public String getAvat() { + return Avat; + } + + public void setAvat(String avat) { + Avat = avat; + } + + public String getAwemeShortID() { + return AwemeShortID; + } + + public void setAwemeShortID(String awemeShortID) { + AwemeShortID = awemeShortID; + } + + public String getNickname() { + return Nickname; + } + + public void setNickname(String nickname) { + Nickname = nickname; + } + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOrderData.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOrderData.java new file mode 100644 index 0000000..973dae5 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOrderData.java @@ -0,0 +1,144 @@ +package com.dyj.applet.domain; + +import java.util.Map; + +public class SmallHomeOrderData { + + /** + * key 订单号 + * value 订单数据 + */ + private Map room_data; + + public Map getRoom_data() { + return room_data; + } + + public void setRoom_data(Map room_data) { + this.room_data = room_data; + } + + public static class SmallHomeOrderValueData { + + /** + * 小程序app_id + */ + private String app_id; + /** + * 小程序名称 + */ + private String app_name; + /** + * 主播昵称 + */ + private String nick_name; + /** + * 目前订单状态,目前为3个枚举值:待使用/已完成/已退款 + */ + private Integer order_status; + /** + * 主播uid + */ + private String anchor_id; + /** + * 核销订单金额(单位:分) + */ + private Long delivery_success_amount; + /** + * 支付订单金额(单位:分) + */ + private Long pay_amount; + /** + * 支付时间,秒级时间戳 + */ + private Long pay_time; + /** + * 已退款订单金额(单位:分) + */ + private Long refund_success_amount; + /** + * 直播间id + */ + private String room_id; + + public String getApp_id() { + return app_id; + } + + public void setApp_id(String app_id) { + this.app_id = app_id; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + public String getNick_name() { + return nick_name; + } + + public void setNick_name(String nick_name) { + this.nick_name = nick_name; + } + + public Integer getOrder_status() { + return order_status; + } + + public void setOrder_status(Integer order_status) { + this.order_status = order_status; + } + + public String getAnchor_id() { + return anchor_id; + } + + public void setAnchor_id(String anchor_id) { + this.anchor_id = anchor_id; + } + + public Long getDelivery_success_amount() { + return delivery_success_amount; + } + + public void setDelivery_success_amount(Long delivery_success_amount) { + this.delivery_success_amount = delivery_success_amount; + } + + public Long getPay_amount() { + return pay_amount; + } + + public void setPay_amount(Long pay_amount) { + this.pay_amount = pay_amount; + } + + public Long getPay_time() { + return pay_time; + } + + public void setPay_time(Long pay_time) { + this.pay_time = pay_time; + } + + public Long getRefund_success_amount() { + return refund_success_amount; + } + + public void setRefund_success_amount(Long refund_success_amount) { + this.refund_success_amount = refund_success_amount; + } + + public String getRoom_id() { + return room_id; + } + + public void setRoom_id(String room_id) { + this.room_id = room_id; + } + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOverviewData.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOverviewData.java new file mode 100644 index 0000000..c4f8d7d --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeOverviewData.java @@ -0,0 +1,185 @@ +package com.dyj.applet.domain; + +public class SmallHomeOverviewData { + /** + * 小程序app_id + */ + private String app_id; + /** + * 小程序名称 + */ + private String app_name; + /** + * 核销订单金额(单位:分) + */ + private Long delivery_success_amount; + /** + * 核销订单数 + */ + private Integer delivery_success_order_cnt; + /** + * 累计主播数 + */ + private Long live_anchors_cnt; + /** + * 累计直播时长(单位:秒) + */ + private Long live_duration; + /** + * 累计直播场次 + */ + private Integer live_session_cnt; + /** + * 最高在线人数 + */ + private Integer max_watch_user_cnt; + /** + * 支付订单金额(单位:分) + */ + private Long pay_amount; + /** + * 支付订单数 + */ + private Integer pay_order_cnt; + /** + * 人均观看时长(累计观看时长/累计看播人数 (单位:秒)) + */ + private Long per_watch_duration; + + /** + * 已退款订单金额(单位:分) + */ + private Integer refund_success_amount; + /** + * 已退款订单数 + */ + private Integer refund_success_order_cnt; + /** + * 累计观看时长(单位:秒) + */ + private Long watch_duration; + /** + * 累计看播人数 + */ + private Integer watch_user_cnt; + + public String getApp_id() { + return app_id; + } + + public void setApp_id(String app_id) { + this.app_id = app_id; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + public Long getDelivery_success_amount() { + return delivery_success_amount; + } + + public void setDelivery_success_amount(Long delivery_success_amount) { + this.delivery_success_amount = delivery_success_amount; + } + + public Integer getDelivery_success_order_cnt() { + return delivery_success_order_cnt; + } + + public void setDelivery_success_order_cnt(Integer delivery_success_order_cnt) { + this.delivery_success_order_cnt = delivery_success_order_cnt; + } + + public Long getLive_anchors_cnt() { + return live_anchors_cnt; + } + + public void setLive_anchors_cnt(Long live_anchors_cnt) { + this.live_anchors_cnt = live_anchors_cnt; + } + + public Long getLive_duration() { + return live_duration; + } + + public void setLive_duration(Long live_duration) { + this.live_duration = live_duration; + } + + public Integer getLive_session_cnt() { + return live_session_cnt; + } + + public void setLive_session_cnt(Integer live_session_cnt) { + this.live_session_cnt = live_session_cnt; + } + + public Integer getMax_watch_user_cnt() { + return max_watch_user_cnt; + } + + public void setMax_watch_user_cnt(Integer max_watch_user_cnt) { + this.max_watch_user_cnt = max_watch_user_cnt; + } + + public Long getPay_amount() { + return pay_amount; + } + + public void setPay_amount(Long pay_amount) { + this.pay_amount = pay_amount; + } + + public Integer getPay_order_cnt() { + return pay_order_cnt; + } + + public void setPay_order_cnt(Integer pay_order_cnt) { + this.pay_order_cnt = pay_order_cnt; + } + + public Long getPer_watch_duration() { + return per_watch_duration; + } + + public void setPer_watch_duration(Long per_watch_duration) { + this.per_watch_duration = per_watch_duration; + } + + public Integer getRefund_success_amount() { + return refund_success_amount; + } + + public void setRefund_success_amount(Integer refund_success_amount) { + this.refund_success_amount = refund_success_amount; + } + + public Integer getRefund_success_order_cnt() { + return refund_success_order_cnt; + } + + public void setRefund_success_order_cnt(Integer refund_success_order_cnt) { + this.refund_success_order_cnt = refund_success_order_cnt; + } + + public Long getWatch_duration() { + return watch_duration; + } + + public void setWatch_duration(Long watch_duration) { + this.watch_duration = watch_duration; + } + + public Integer getWatch_user_cnt() { + return watch_user_cnt; + } + + public void setWatch_user_cnt(Integer watch_user_cnt) { + this.watch_user_cnt = watch_user_cnt; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeRoomData.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeRoomData.java new file mode 100644 index 0000000..6f85f83 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/SmallHomeRoomData.java @@ -0,0 +1,197 @@ +package com.dyj.applet.domain; + +public class SmallHomeRoomData { + /** + * 小程序app_id + */ + private String app_id; + /** + * 小程序名称 + */ + private String app_name; + /** + * 核销订单金额(单位:分) + */ + private Long delivery_success_amount; + /** + * 核销订单数 + */ + private Long delivery_success_order_cnt; + /** + * 直播开播时间,秒级时间戳 + */ + private Long start_time; + /** + * 直播结束时间,秒级时间戳 + */ + private Long end_time; + /** + * 累计直播时长(单位:秒) + */ + private Long live_duration; + /** + * 最高在线人数 + */ + private Long max_watch_user_cnt; + /** + * 主播昵称 + */ + private String nick_name; + /** + * 支付订单金额(单位:分) + */ + private Long pay_amount; + /** + * 支付订单数 + */ + private Integer pay_order_cnt; + /** + * 人均观看时长(累计观看时长/累计看播人数 (单位:秒)) + */ + private Long per_watch_duration; + /** + * 主播uid + */ + private String anchor_id; + /** + * 已退款订单金额(单位:分) + */ + private Long refund_success_amount; + /** + *已退款订单数 + */ + private Long refund_success_order_cnt; + /** + * 累计看播人数 + */ + private Integer watch_user_cnt; + + + public String getApp_id() { + return app_id; + } + + public void setApp_id(String app_id) { + this.app_id = app_id; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + public Long getDelivery_success_amount() { + return delivery_success_amount; + } + + public void setDelivery_success_amount(Long delivery_success_amount) { + this.delivery_success_amount = delivery_success_amount; + } + + public Long getDelivery_success_order_cnt() { + return delivery_success_order_cnt; + } + + public void setDelivery_success_order_cnt(Long delivery_success_order_cnt) { + this.delivery_success_order_cnt = delivery_success_order_cnt; + } + + public Long getStart_time() { + return start_time; + } + + public void setStart_time(Long start_time) { + this.start_time = start_time; + } + + public Long getEnd_time() { + return end_time; + } + + public void setEnd_time(Long end_time) { + this.end_time = end_time; + } + + public Long getLive_duration() { + return live_duration; + } + + public void setLive_duration(Long live_duration) { + this.live_duration = live_duration; + } + + public Long getMax_watch_user_cnt() { + return max_watch_user_cnt; + } + + public void setMax_watch_user_cnt(Long max_watch_user_cnt) { + this.max_watch_user_cnt = max_watch_user_cnt; + } + + public String getNick_name() { + return nick_name; + } + + public void setNick_name(String nick_name) { + this.nick_name = nick_name; + } + + public Long getPay_amount() { + return pay_amount; + } + + public void setPay_amount(Long pay_amount) { + this.pay_amount = pay_amount; + } + + public Integer getPay_order_cnt() { + return pay_order_cnt; + } + + public void setPay_order_cnt(Integer pay_order_cnt) { + this.pay_order_cnt = pay_order_cnt; + } + + public Long getPer_watch_duration() { + return per_watch_duration; + } + + public void setPer_watch_duration(Long per_watch_duration) { + this.per_watch_duration = per_watch_duration; + } + + public String getAnchor_id() { + return anchor_id; + } + + public void setAnchor_id(String anchor_id) { + this.anchor_id = anchor_id; + } + + public Long getRefund_success_amount() { + return refund_success_amount; + } + + public void setRefund_success_amount(Long refund_success_amount) { + this.refund_success_amount = refund_success_amount; + } + + public Long getRefund_success_order_cnt() { + return refund_success_order_cnt; + } + + public void setRefund_success_order_cnt(Long refund_success_order_cnt) { + this.refund_success_order_cnt = refund_success_order_cnt; + } + + public Integer getWatch_user_cnt() { + return watch_user_cnt; + } + + public void setWatch_user_cnt(Integer watch_user_cnt) { + this.watch_user_cnt = watch_user_cnt; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/query/LiveWithShortIdQuery.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/query/LiveWithShortIdQuery.java new file mode 100644 index 0000000..c5c5cb5 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/query/LiveWithShortIdQuery.java @@ -0,0 +1,162 @@ +package com.dyj.applet.domain.query; + +import com.dyj.common.domain.query.BaseQuery; + +import java.util.List; + +public class LiveWithShortIdQuery extends BaseQuery { + + /** + * 开始时间,必须是昨天以前的某个时间戳 + */ + private Long start_time; + /** + * 结束时间,必须是昨天以前的某个时间戳 + */ + private Long end_time; + /** + * 分页 + */ + private Integer page_no; + /** + * 分页大小,最大50 + */ + private Integer page_size; + /** + * 选择的抖音号列表 + */ + private List aweme_short_id_list; + /** + * 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; + */ + private String host_name; + + public static LiveWithShortIdQueryBuilder builder() { + return new LiveWithShortIdQueryBuilder(); + } + + public static class LiveWithShortIdQueryBuilder { + /** + * 开始时间,必须是昨天以前的某个时间戳 + */ + private Long startTime; + /** + * 结束时间,必须是昨天以前的某个时间戳 + */ + private Long endTime; + /** + * 分页 + */ + private Integer pageNo; + /** + * 分页大小,最大50 + */ + private Integer pageSize; + /** + * 选择的抖音号列表 + */ + private List awemeShortIdList; + /** + * 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; + */ + private String hostNme; + + private Integer tenantId; + + private String clientKey; + + public LiveWithShortIdQueryBuilder startTime(Long startTime) { + this.startTime = startTime; + return this; + } + public LiveWithShortIdQueryBuilder endTime(Long endTime) { + this.endTime = endTime; + return this; + } + public LiveWithShortIdQueryBuilder pageNo(Integer pageNo) { + this.pageNo = pageNo; + return this; + } + public LiveWithShortIdQueryBuilder pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + public LiveWithShortIdQueryBuilder awemeShortIdList(List awemeShortIdList) { + this.awemeShortIdList = awemeShortIdList; + return this; + } + public LiveWithShortIdQueryBuilder hostNme(String hostNme) { + this.hostNme = hostNme; + return this; + } + public LiveWithShortIdQueryBuilder tenantId(Integer tenantId) { + this.tenantId = tenantId; + return this; + } + public LiveWithShortIdQueryBuilder clientKey(String clientKey) { + this.clientKey = clientKey; + return this; + } + public LiveWithShortIdQuery build() { + LiveWithShortIdQuery liveWithShortIdQuery = new LiveWithShortIdQuery(); + liveWithShortIdQuery.setStart_time(startTime); + liveWithShortIdQuery.setEnd_time(endTime); + liveWithShortIdQuery.setPage_no(pageNo); + liveWithShortIdQuery.setPage_size(pageSize); + liveWithShortIdQuery.setAweme_short_id_list(awemeShortIdList); + liveWithShortIdQuery.setHost_name(hostNme); + liveWithShortIdQuery.setTenantId(tenantId); + liveWithShortIdQuery.setClientKey(clientKey); + return liveWithShortIdQuery; + } + } + + + public Long getStart_time() { + return start_time; + } + + public void setStart_time(Long start_time) { + this.start_time = start_time; + } + + public Long getEnd_time() { + return end_time; + } + + public void setEnd_time(Long end_time) { + this.end_time = end_time; + } + + public Integer getPage_no() { + return page_no; + } + + public void setPage_no(Integer page_no) { + this.page_no = page_no; + } + + public Integer getPage_size() { + return page_size; + } + + public void setPage_size(Integer page_size) { + this.page_size = page_size; + } + + public List getAweme_short_id_list() { + return aweme_short_id_list; + } + + public void setAweme_short_id_list(List aweme_short_id_list) { + this.aweme_short_id_list = aweme_short_id_list; + } + + public String getHost_name() { + return host_name; + } + + public void setHost_name(String host_name) { + this.host_name = host_name; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/LiveWithShortIdVo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/LiveWithShortIdVo.java new file mode 100644 index 0000000..74fef67 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/LiveWithShortIdVo.java @@ -0,0 +1,31 @@ +package com.dyj.applet.domain.vo; + +import com.dyj.applet.domain.LiveWithShortData; + +import java.util.List; + +public class LiveWithShortIdVo { + + /** + * 总数 + */ + private Long Total; + + private List ShortDataList; + + public Long getTotal() { + return Total; + } + + public void setTotal(Long total) { + Total = total; + } + + public List getShortDataList() { + return ShortDataList; + } + + public void setShortDataList(List shortDataList) { + ShortDataList = shortDataList; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOrderDataVo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOrderDataVo.java new file mode 100644 index 0000000..6f8cc7c --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOrderDataVo.java @@ -0,0 +1,70 @@ +package com.dyj.applet.domain.vo; + +import com.dyj.applet.domain.SmallHomeOrderData; + +public class SmallHomeOrderDataVo { + + /** + * + * 小程序app_id + */ + private String app_id; + /** + * + * 小程序名称 + */ + private String app_name; + /** + * + * 是否还有更多数据 + */ + private Boolean has_more; + /** + * 查询这段时间内按直播间id维度聚合数据总数量 + */ + private Long total_num; + /** + * 订单数据 + */ + private SmallHomeOrderData order_data; + + public String getApp_id() { + return app_id; + } + + public void setApp_id(String app_id) { + this.app_id = app_id; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + public Boolean getHas_more() { + return has_more; + } + + public void setHas_more(Boolean has_more) { + this.has_more = has_more; + } + + public Long getTotal_num() { + return total_num; + } + + public void setTotal_num(Long total_num) { + this.total_num = total_num; + } + + public SmallHomeOrderData getOrder_data() { + return order_data; + } + + public void setOrder_data(SmallHomeOrderData order_data) { + this.order_data = order_data; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOverviewDataVo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOverviewDataVo.java new file mode 100644 index 0000000..386e4fe --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeOverviewDataVo.java @@ -0,0 +1,41 @@ +package com.dyj.applet.domain.vo; + +import com.dyj.applet.domain.SmallHomeOverviewData; + +public class SmallHomeOverviewDataVo { + /** + * + * 小程序app_id + */ + private String app_id; + /** + * + * 小程序名称 + */ + private String app_name; + private SmallHomeOverviewData over_view_data; + + public String getApp_id() { + return app_id; + } + + public void setApp_id(String app_id) { + this.app_id = app_id; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + public SmallHomeOverviewData getOver_view_data() { + return over_view_data; + } + + public void setOver_view_data(SmallHomeOverviewData over_view_data) { + this.over_view_data = over_view_data; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeRoomDataVo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeRoomDataVo.java new file mode 100644 index 0000000..4cc82fb --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/SmallHomeRoomDataVo.java @@ -0,0 +1,68 @@ +package com.dyj.applet.domain.vo; + +import com.dyj.applet.domain.SmallHomeRoomData; + +public class SmallHomeRoomDataVo { + + /** + * + * 小程序app_id + */ + private String app_id; + /** + * + * 小程序名称 + */ + private String app_name; + /** + * + * 是否还有更多数据 + */ + private Boolean has_more; + /** + * 查询这段时间内按直播间id维度聚合数据总数量 + */ + private Long total_num; + + private SmallHomeRoomData room_data; + + public String getApp_id() { + return app_id; + } + + public void setApp_id(String app_id) { + this.app_id = app_id; + } + + public String getApp_name() { + return app_name; + } + + public void setApp_name(String app_name) { + this.app_name = app_name; + } + + public Boolean getHas_more() { + return has_more; + } + + public void setHas_more(Boolean has_more) { + this.has_more = has_more; + } + + public Long getTotal_num() { + return total_num; + } + + public void setTotal_num(Long total_num) { + this.total_num = total_num; + } + + public SmallHomeRoomData getRoom_data() { + return room_data; + } + + public void setRoom_data(SmallHomeRoomData room_data) { + this.room_data = room_data; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/handler/AptDataAnalysisHandler.java b/dy-java-applet/src/main/java/com/dyj/applet/handler/AptDataAnalysisHandler.java index 0712f17..9a5ca35 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/handler/AptDataAnalysisHandler.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/handler/AptDataAnalysisHandler.java @@ -1,15 +1,10 @@ package com.dyj.applet.handler; -import com.dtflys.forest.annotation.*; -import com.dyj.applet.domain.query.AnalysisVideoDataQuery; -import com.dyj.applet.domain.query.AnalysisVideoSourceQuery; -import com.dyj.applet.domain.query.ShortLiveDataWithIdQuery; -import com.dyj.applet.domain.query.ShortLiveIdWithAwemeIdQuery; +import com.dtflys.forest.annotation.Query; +import com.dyj.applet.domain.query.*; import com.dyj.applet.domain.vo.*; import com.dyj.common.config.AgentConfiguration; import com.dyj.common.domain.DySimpleResult; -import com.dyj.common.domain.query.BaseQuery; -import com.dyj.common.interceptor.ClientTokenInterceptor; import java.util.List; @@ -116,87 +111,95 @@ public class AptDataAnalysisHandler extends AbstractAppletHandler { /** * 总览分析 - * @param startTime 开始时间,必须是昨天以前的某个时间戳 - * @param endTime 结束时间,必须是昨天以前的某个时间戳 - * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳 + * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; * @param versionType 版本类型。online-线上版本;gray-灰度版本 * @return */ - public DySimpleResult queryDealOverviewData(Long startTime, Long endTime,String hostName, String versionType){ + public DySimpleResult queryDealOverviewData(Long startTime, Long endTime, String hostName, String versionType) { return getDataAnalysisClient().queryDealOverviewData(baseQuery(), startTime, endTime, hostName, versionType); } /** * 流量转化 - * @param startTime 开始时间,必须是昨天以前的某个时间戳 - * @param endTime 结束时间,必须是昨天以前的某个时间戳 - * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳 + * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版 * @param scenes_list 流量来源渠道 * @return DySimpleResult */ - public DySimpleResult queryDealDataWithConversion(Long startTime, Long endTime, String hostName, List scenes_list){ + public DySimpleResult queryDealDataWithConversion(Long startTime, Long endTime, String hostName, List scenes_list) { return getDataAnalysisClient().queryDealDataWithConversion(baseQuery(), startTime, endTime, hostName, scenes_list); } /** * 短视频交易分析 + * * @param startTime 开始时间,必须是昨天以前的某个时间戳 - * @param endTime 结束时间,必须是昨天以前的某个时间戳 - * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; + * @param endTime 结束时间,必须是昨天以前的某个时间戳 + * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; * @return DySimpleResult */ - public DySimpleResult queryVideoDealData(Long startTime, Long endTime, String hostName){ + public DySimpleResult queryVideoDealData(Long startTime, Long endTime, String hostName) { return getDataAnalysisClient().queryVideoDealData(baseQuery(), startTime, endTime, hostName); } /** * 获取直播房间数据 + * * @param anchorName 主播昵称 * @return DySimpleResult */ - public DySimpleResult queryLiveRoomData(String anchorName){ + public DySimpleResult queryLiveRoomData(String anchorName) { return getDataAnalysisClient().queryLiveRoomData(baseQuery(), anchorName); } /** * 直播数据分析 + * * @param liveRoomId 直播间ID,可通过【获取直播房间数据】接口获取该字段通过 /api/platform/v2/data_analysis/query_live_room/ * 接口返回的 data.current_live_room.0.live_room_id 字段获取 * @return */ - public DySimpleResult queryLiveRoomData(Long liveRoomId){ + public DySimpleResult queryLiveRoomData(Long liveRoomId) { return getDataAnalysisClient().queryLiveRoomData(baseQuery(), liveRoomId); } /** * 直播交易分析 - * @param liveRoomId 直播间ID,可通过【获取直播房间数据】接口获取该字段通过 /api/platform/v2/data_analysis/query_live_room/ - * 接口返回的 data.history_live_room.0.live_room_id 字段获取 + * + * @param liveRoomId 直播间ID,可通过【获取直播房间数据】接口获取该字段通过 /api/platform/v2/data_analysis/query_live_room/ + * 接口返回的 data.history_live_room.0.live_room_id 字段获取 * @return */ - public DySimpleResult queryLiveDealData(Long liveRoomId){ + public DySimpleResult queryLiveDealData(Long liveRoomId) { return getDataAnalysisClient().queryLiveDealData(baseQuery(), liveRoomId); } /** * 商品分析 + * * @param startTime 开始时间,必须是昨天以前的某个时间戳 - * @param endTime 结束时间,必须是昨天以前的某个时间戳 - * @param pageNum 页码,默认为1 - * @param pageSize 每页数量,默认为20,最大为50 - * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; + * @param endTime 结束时间,必须是昨天以前的某个时间戳 + * @param pageNum 页码,默认为1 + * @param pageSize 每页数量,默认为20,最大为50 + * @param hostName 宿主APP,douyin-抖音;douyin_lite-抖音lite;toutiao-今日头条;tt_lite-今日头条lite;huoshan-抖音火山版; * @return DySimpleResult */ - public DySimpleResult queryProductDealData(Long startTime, Long endTime, Long pageNum, Long pageSize, String hostName){ + public DySimpleResult queryProductDealData(Long startTime, Long endTime, Long pageNum, Long pageSize, String hostName) { return getDataAnalysisClient().queryProductDealData(baseQuery(), startTime, endTime, pageNum, pageSize, hostName); } /** * 短视频投稿数据 + * * @param query 短视频投稿数据参数 * @return DySimpleResult */ - public DySimpleResult queryShortLiveIdWithAwemeId(ShortLiveIdWithAwemeIdQuery query){ + public DySimpleResult queryShortIdWithAwemeId(ShortLiveIdWithAwemeIdQuery query) { baseQuery(query); return getDataAnalysisClient().queryShortLiveIdWithAwemeId(query); } @@ -204,31 +207,107 @@ public class AptDataAnalysisHandler extends AbstractAppletHandler { /** * 短视频总览数据 + * * @param query 视频数据查询参数 * @return DySimpleResult */ - public DySimpleResult queryVideoData(AnalysisVideoDataQuery query){ + public DySimpleResult queryVideoData(AnalysisVideoDataQuery query) { baseQuery(query); return getDataAnalysisClient().queryVideoData(query); } /** * 短视频详细数据 + * * @param query 视频数据查询参数 * @return DySimpleResult */ - public DySimpleResult queryShortLiveDataWithId(ShortLiveDataWithIdQuery query){ + public DySimpleResult queryShortDataWithId(ShortLiveDataWithIdQuery query) { baseQuery(query); return getDataAnalysisClient().queryShortLiveDataWithId(query); } /** * 流量来源 + * * @param query 流量来源查询参数 * @return DySimpleResult */ - public DySimpleResult queryVideoWithSource(AnalysisVideoSourceQuery query){ + public DySimpleResult queryVideoWithSource(AnalysisVideoSourceQuery query) { baseQuery(query); return getDataAnalysisClient().queryVideoWithSource(query); } + + + /** + * 直播投稿数据 + * + * @param query 直播投稿数据参数 + * @return DySimpleResult + */ + public DySimpleResult queryLiveWithAwemeId(ShortLiveIdWithAwemeIdQuery query) { + baseQuery(query); + return getDataAnalysisClient().queryShortLiveIdWithAwemeId(query); + } + + + /** + * 直播间详细数据 + * + * @param query 直播间详细数据查询参数 + * @return DySimpleResult + */ + public DySimpleResult queryLiveDataWithId(ShortLiveDataWithIdQuery query) { + baseQuery(query); + return getDataAnalysisClient().queryShortLiveDataWithId(query); + } + + /** + * 主播分析 + * + * @param query 主播分析参数 + * @return DySimpleResult + */ + public DySimpleResult queryLiveWithShortId(LiveWithShortIdQuery query) { + baseQuery(query); + return getDataAnalysisClient().queryLiveWithShortId(query); + } + + + /** + * 小房子直播间总览数据 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @return DySimpleResult + */ + public DySimpleResult querySmallHomeOverviewData(Long startTime, Long endTime) { + return getDataAnalysisClient().querySmallHomeOverviewData(baseQuery(), startTime, endTime); + } + + /** + * 小房子直播间详细数据 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @return DySimpleResult + */ + public DySimpleResult querySmallHomeRoomData(Long startTime, Long endTime) { + return getDataAnalysisClient().querySmallHomeRoomData(baseQuery(), startTime, endTime); + } + + /** + * 小房子直播间订单数据 + * + * @param startTime 开始时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询2023年3月20号以来的数据,start_time就传2023-03-20 00:00:00对应的时间戳 + * @param endTime 结束时间,必须是昨天以前的某个时间戳,最好是传入当天的整点时间戳,例如要查询截止到2023年3月20号的数据,end_time就传2023-03-20 00:00:00对应的时间戳 + * @param pageNum 分页编号,从 0 开始 + * @param pageSize 分页大小,小于等于 1000,大于1000的默认取最大值1000 + * @return DySimpleResult + */ + public DySimpleResult querySmallHomeOrderData(Long startTime, Long endTime, Integer pageNum, Integer pageSize) { + return getDataAnalysisClient().querySmallHomeOrderData(baseQuery(), startTime, endTime, pageNum, pageSize); + } + + }