From 4de6cbb01aa29ddca08b6096bb2c61e39741fb71 Mon Sep 17 00:00:00 2001 From: 353259576 <1048058229@qq.com> Date: Mon, 9 Sep 2024 15:04:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=9F=E6=B4=BB=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E4=BA=A4=E6=98=93=E7=B3=BB=E7=BB=9F->=E9=A2=84=E7=BA=A6->?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E9=A2=84=E7=BA=A6=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dyj/applet/DyAppletClient.java | 9 ++ .../client/IndustryTransactionClient.java | 8 + .../com/dyj/applet/domain/BookMarkupInfo.java | 64 ++++++++ .../applet/domain/BookMarkupOrderInfo.java | 46 ++++++ .../com/dyj/applet/domain/BookSkuInfo.java | 51 +++++++ .../com/dyj/applet/domain/BookUserInfo.java | 50 +++++++ .../com/dyj/applet/domain/ItemBookInfo.java | 141 ++++++++++++++++++ .../applet/domain/query/CreateBookQuery.java | 134 +++++++++++++++++ .../dyj/applet/domain/vo/CreateBookVo.java | 34 +++++ .../handler/IndustryTransactionHandler.java | 13 ++ .../dyj/common/enums/DyAppletUrlPathEnum.java | 5 + .../dyj/examples/applet/TransactionTest.java | 13 ++ 12 files changed, 568 insertions(+) create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupInfo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupOrderInfo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/BookSkuInfo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/BookUserInfo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/ItemBookInfo.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/query/CreateBookQuery.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/vo/CreateBookVo.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 d844951..4b15a52 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 @@ -2177,6 +2177,15 @@ public class DyAppletClient extends BaseClient { return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).industryQueryRefund(body); } + /** + * 生活服务交易系统->预约->创建预约单 + * @param body + * @return + */ + public DataAndExtraVo createBook(CreateBookQuery body){ + return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).createBook(body); + } + /** * 获取抖音号绑定所需的资质模版列表 * diff --git a/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java b/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java index f253b38..73a2297 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java @@ -124,4 +124,12 @@ public interface IndustryTransactionClient { */ @Post(value = "${queryRefund}", interceptor = ClientTokenInterceptor.class) DataAndExtraVo industryQueryRefund(@JSONBody QueryRefundQuery body); + + /** + * 生活服务交易系统->预约->创建预约单 + * @param body + * @return + */ + @Post(value = "createBook", interceptor = ClientTokenInterceptor.class) + DataAndExtraVo createBook(@JSONBody CreateBookQuery body); } diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupInfo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupInfo.java new file mode 100644 index 0000000..1e292ff --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupInfo.java @@ -0,0 +1,64 @@ +package com.dyj.applet.domain; + +/** + * 加价信息 + */ +public class BookMarkupInfo { + + /** + * 加价单订单总金额 + */ + private Long total_amount; + + /** + * 支付结果通知地址,必须是https类型。若不填,默认使用在行业模板配置-消息通知页面设置的支付回调地址。加价单支付超时时间是300s。配置地址为:https://developer.open-douyin.com/microapp/${appid}/industry/template,注意将此地址中的${appid}更换为自己的appid + * 选填 + */ + private String pay_notify_url; + + /** + * 加价单的开发者单号,长度 <= 64 byte + */ + private String out_markup_no; + + /** + * 订单详情页信息,详见 OrderEntrySchema + */ + private IndustryOrderOrderEntrySchema order_entry_schema; + + public Long getTotal_amount() { + return total_amount; + } + + public BookMarkupInfo setTotal_amount(Long total_amount) { + this.total_amount = total_amount; + return this; + } + + public String getPay_notify_url() { + return pay_notify_url; + } + + public BookMarkupInfo setPay_notify_url(String pay_notify_url) { + this.pay_notify_url = pay_notify_url; + return this; + } + + public String getOut_markup_no() { + return out_markup_no; + } + + public BookMarkupInfo setOut_markup_no(String out_markup_no) { + this.out_markup_no = out_markup_no; + return this; + } + + public IndustryOrderOrderEntrySchema getOrder_entry_schema() { + return order_entry_schema; + } + + public BookMarkupInfo setOrder_entry_schema(IndustryOrderOrderEntrySchema order_entry_schema) { + this.order_entry_schema = order_entry_schema; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupOrderInfo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupOrderInfo.java new file mode 100644 index 0000000..adb23b2 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookMarkupOrderInfo.java @@ -0,0 +1,46 @@ +package com.dyj.applet.domain; + +public class BookMarkupOrderInfo { + + /** + * 加价单id,抖音开平侧生成的订单号 + */ + private String markup_order_id; + + /** + * 唤起收银台的支付订单号 + */ + private String pay_order_id; + + /** + * 唤起收银台的token + */ + private String pay_order_token; + + public String getMarkup_order_id() { + return markup_order_id; + } + + public BookMarkupOrderInfo setMarkup_order_id(String markup_order_id) { + this.markup_order_id = markup_order_id; + return this; + } + + public String getPay_order_id() { + return pay_order_id; + } + + public BookMarkupOrderInfo setPay_order_id(String pay_order_id) { + this.pay_order_id = pay_order_id; + return this; + } + + public String getPay_order_token() { + return pay_order_token; + } + + public BookMarkupOrderInfo setPay_order_token(String pay_order_token) { + this.pay_order_token = pay_order_token; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/BookSkuInfo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookSkuInfo.java new file mode 100644 index 0000000..fa1da86 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookSkuInfo.java @@ -0,0 +1,51 @@ +package com.dyj.applet.domain; + +/** + * 预约的商品SKU信息,需要加价时必填,详见BookSkuInfo + */ +public class BookSkuInfo { + + /** + * sku金额 + * •加价的商品价格不能大于预售单的商品价格两倍 + * 选填 + */ + private Long price; + + /** + * 预约的商品sku_id + */ + private String sku_id; + + /** + * sku_id类型 1-商品库skuId 2-非商品库skuId + */ + private Integer sku_id_type; + + public Long getPrice() { + return price; + } + + public BookSkuInfo setPrice(Long price) { + this.price = price; + return this; + } + + public String getSku_id() { + return sku_id; + } + + public BookSkuInfo setSku_id(String sku_id) { + this.sku_id = sku_id; + return this; + } + + public Integer getSku_id_type() { + return sku_id_type; + } + + public BookSkuInfo setSku_id_type(Integer sku_id_type) { + this.sku_id_type = sku_id_type; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/BookUserInfo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookUserInfo.java new file mode 100644 index 0000000..17b07d6 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/BookUserInfo.java @@ -0,0 +1,50 @@ +package com.dyj.applet.domain; + +/** + * 预约接口 + * 用户信息 + */ +public class BookUserInfo { + + /** + * 使用人名称 + */ + private String name; + + /** + * 电话号码 + */ + private String phone; + + /** + * 身份证号码 + */ + private String id_card_no; + + public String getName() { + return name; + } + + public BookUserInfo setName(String name) { + this.name = name; + return this; + } + + public String getPhone() { + return phone; + } + + public BookUserInfo setPhone(String phone) { + this.phone = phone; + return this; + } + + public String getId_card_no() { + return id_card_no; + } + + public BookUserInfo setId_card_no(String id_card_no) { + this.id_card_no = id_card_no; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/ItemBookInfo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/ItemBookInfo.java new file mode 100644 index 0000000..93bc170 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/ItemBookInfo.java @@ -0,0 +1,141 @@ +package com.dyj.applet.domain; + +import java.util.List; + +/** + * 每个item的预约信息,详见ItemBookInfo + */ +public class ItemBookInfo { + + /** + * 预约门店的poiId,实际存储的是int64类型的值 + */ + private String poi_id; + + /** + * 预约门店的名称,参考商铺同步接口中的店铺名称(name) + */ + private String shop_name; + + /** + * 预约门店的外部店铺id,参考商铺同步接口中的接入方店铺id(supplier_ext_id) + */ + private String ext_shop_id; + + /** + * 商品id + */ + private String goods_id; + + /** + * 预约的开始时间(ms),13位毫秒时间戳 + */ + private Long book_start_time; + + /** + * + * 预约的结束时间(ms),13位毫秒时间戳 + * 注意:需满足 当前时间< book_start_time < book_end_time,并且book_end_time必须是180天之内 + */ + private Long book_end_time; + + /** + * 用户信息,详见UserInfo + * 选填 + */ + private List user_info_list; + + /** + * 预约的商品SKU信息,需要加价时必填,详见BookSkuInfo + * •同一个预约单的所有book_sku_info信息需要完全相同 + * 选填 + */ + private BookSkuInfo book_sku_info; + + /** + * 预售单的item_order_id,如果不指定的话,会自动分配。 + * 选填 + */ + private String item_order_id; + + public String getPoi_id() { + return poi_id; + } + + public ItemBookInfo setPoi_id(String poi_id) { + this.poi_id = poi_id; + return this; + } + + public String getShop_name() { + return shop_name; + } + + public ItemBookInfo setShop_name(String shop_name) { + this.shop_name = shop_name; + return this; + } + + public String getExt_shop_id() { + return ext_shop_id; + } + + public ItemBookInfo setExt_shop_id(String ext_shop_id) { + this.ext_shop_id = ext_shop_id; + return this; + } + + public String getGoods_id() { + return goods_id; + } + + public ItemBookInfo setGoods_id(String goods_id) { + this.goods_id = goods_id; + return this; + } + + public Long getBook_start_time() { + return book_start_time; + } + + public ItemBookInfo setBook_start_time(Long book_start_time) { + this.book_start_time = book_start_time; + return this; + } + + public Long getBook_end_time() { + return book_end_time; + } + + public ItemBookInfo setBook_end_time(Long book_end_time) { + this.book_end_time = book_end_time; + return this; + } + + public List getUser_info_list() { + return user_info_list; + } + + public ItemBookInfo setUser_info_list(List user_info_list) { + this.user_info_list = user_info_list; + return this; + } + + public BookSkuInfo getBook_sku_info() { + return book_sku_info; + } + + public ItemBookInfo setBook_sku_info(BookSkuInfo book_sku_info) { + this.book_sku_info = book_sku_info; + return this; + } + + public String getItem_order_id() { + return item_order_id; + } + + public ItemBookInfo setItem_order_id(String item_order_id) { + this.item_order_id = item_order_id; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/query/CreateBookQuery.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/query/CreateBookQuery.java new file mode 100644 index 0000000..f5e2345 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/query/CreateBookQuery.java @@ -0,0 +1,134 @@ +package com.dyj.applet.domain.query; + +import com.dyj.applet.domain.BookMarkupInfo; +import com.dyj.applet.domain.ItemBookInfo; +import com.dyj.common.domain.query.UserInfoQuery; + +import java.util.List; + +/** + * 生活服务交易系统->预约->创建预约单 + */ +public class CreateBookQuery extends UserInfoQuery { + + /** + * 抖音侧订单号 + */ + private String order_id; + + /** + * 外部预约单号 + */ + private String out_book_no; + + /** + * 每个item的预约信息,详见ItemBookInfo + */ + private List item_book_info_list; + + /** + * 加价信息,详见MarkupInfo + * 选填 + */ + private BookMarkupInfo markup_info; + + public String getOrder_id() { + return order_id; + } + + public CreateBookQuery setOrder_id(String order_id) { + this.order_id = order_id; + return this; + } + + public String getOut_book_no() { + return out_book_no; + } + + public CreateBookQuery setOut_book_no(String out_book_no) { + this.out_book_no = out_book_no; + return this; + } + + public List getItem_book_info_list() { + return item_book_info_list; + } + + public CreateBookQuery setItem_book_info_list(List item_book_info_list) { + this.item_book_info_list = item_book_info_list; + return this; + } + + public BookMarkupInfo getMarkup_info() { + return markup_info; + } + + public CreateBookQuery setMarkup_info(BookMarkupInfo markup_info) { + this.markup_info = markup_info; + return this; + } + + public static CreateBookQueryBuilder builder() { + return new CreateBookQueryBuilder(); + } + + public static final class CreateBookQueryBuilder { + private String order_id; + private String out_book_no; + private List item_book_info_list; + private BookMarkupInfo markup_info; + private String open_id; + private Integer tenantId; + private String clientKey; + + private CreateBookQueryBuilder() { + } + + public CreateBookQueryBuilder orderId(String orderId) { + this.order_id = orderId; + return this; + } + + public CreateBookQueryBuilder outBookNo(String outBookNo) { + this.out_book_no = outBookNo; + return this; + } + + public CreateBookQueryBuilder itemBookInfoList(List itemBookInfoList) { + this.item_book_info_list = itemBookInfoList; + return this; + } + + public CreateBookQueryBuilder markupInfo(BookMarkupInfo markupInfo) { + this.markup_info = markupInfo; + return this; + } + + public CreateBookQueryBuilder openId(String openId) { + this.open_id = openId; + return this; + } + + public CreateBookQueryBuilder tenantId(Integer tenantId) { + this.tenantId = tenantId; + return this; + } + + public CreateBookQueryBuilder clientKey(String clientKey) { + this.clientKey = clientKey; + return this; + } + + public CreateBookQuery build() { + CreateBookQuery createBookQuery = new CreateBookQuery(); + createBookQuery.setOrder_id(order_id); + createBookQuery.setOut_book_no(out_book_no); + createBookQuery.setItem_book_info_list(item_book_info_list); + createBookQuery.setMarkup_info(markup_info); + createBookQuery.setOpen_id(open_id); + createBookQuery.setTenantId(tenantId); + createBookQuery.setClientKey(clientKey); + return createBookQuery; + } + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/CreateBookVo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/CreateBookVo.java new file mode 100644 index 0000000..ff428f9 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/CreateBookVo.java @@ -0,0 +1,34 @@ +package com.dyj.applet.domain.vo; + +import com.dyj.applet.domain.BookMarkupOrderInfo; + +public class CreateBookVo { + + /** + * 预约单id + */ + private String book_id; + + /** + * 加价单信息,详见 MarkupOrderInfo + */ + private BookMarkupOrderInfo markup_order_info; + + public String getBook_id() { + return book_id; + } + + public CreateBookVo setBook_id(String book_id) { + this.book_id = book_id; + return this; + } + + public BookMarkupOrderInfo getMarkup_order_info() { + return markup_order_info; + } + + public CreateBookVo setMarkup_order_info(BookMarkupOrderInfo markup_order_info) { + this.markup_order_info = markup_order_info; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java b/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java index 484d610..4b5c4ef 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java @@ -1,5 +1,7 @@ package com.dyj.applet.handler; +import com.dtflys.forest.annotation.JSONBody; +import com.dtflys.forest.annotation.Post; import com.dyj.applet.domain.QueryAndCalculateMarketingResult; import com.dyj.applet.domain.query.*; import com.dyj.applet.domain.vo.*; @@ -7,6 +9,7 @@ import com.dyj.common.config.AgentConfiguration; import com.dyj.common.domain.DataAndExtraVo; import com.dyj.common.domain.DySimpleResult; import com.dyj.common.domain.vo.BaseVo; +import com.dyj.common.interceptor.ClientTokenInterceptor; import java.util.List; @@ -149,4 +152,14 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{ baseQuery(body); return getIndustryOpenTransactionClient().industryQueryRefund(body); } + + /** + * 生活服务交易系统->预约->创建预约单 + * @param body + * @return + */ + public DataAndExtraVo createBook(CreateBookQuery body){ + baseQuery(body); + return getIndustryOpenTransactionClient().createBook(body); + } } diff --git a/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java b/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java index c085116..f973c38 100644 --- a/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java +++ b/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java @@ -532,6 +532,11 @@ public enum DyAppletUrlPathEnum { * 生活服务交易系统->退货退款->查询退款 */ QUERY_REFUND("queryRefund","/api/apps/trade/v2/refund/query_refund"), + + /** + * 生活服务交易系统->预约->创建预约单 + */ + CREATE_BOOK("createBook","/api/apps/trade/v2/book/create_book"), ; diff --git a/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java b/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java index 22b6c89..93cf873 100644 --- a/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java +++ b/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java @@ -520,4 +520,17 @@ public class TransactionTest { ); } + /** + * 生活服务交易系统->预约->创建预约单 + */ + @Test + public void createBook(){ + DyAppletClient dyAppletClient = new DyAppletClient(); + System.out.println( + JSON.toJSONString( + dyAppletClient.createBook(CreateBookQuery.builder().build()) + ) + ); + } + } 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 2/2] =?UTF-8?q?=E5=B0=8F=E6=88=BF=E5=AD=90=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=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); + } + + }