生活服务交易系统->预约->查询预约单信息

This commit is contained in:
353259576 2024-09-13 10:28:02 +08:00
parent 263d74a0da
commit 70573454b7
9 changed files with 360 additions and 0 deletions

View File

@ -2211,6 +2211,13 @@ public class DyAppletClient extends BaseClient {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).userCancelBook(body);
}
/**
* 生活服务交易系统->预约->查询预约单信息
*/
public DataAndExtraVo<List<QueryBookVo>> queryBook(QueryBookQuery body){
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryBook(body);
}
/**
* 获取抖音号绑定所需的资质模版列表
*

View File

@ -154,4 +154,10 @@ public interface IndustryTransactionClient {
*/
@Post(value = "userCancelBook", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<Void> userCancelBook(@JSONBody UserCancelBookQuery body);
/**
* 生活服务交易系统->预约->查询预约单信息
*/
@Post(value = "queryBook", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<List<QueryBookVo>> queryBook(@JSONBody QueryBookQuery body);
}

View File

@ -0,0 +1,128 @@
package com.dyj.applet.domain;
import java.util.List;
/**
* 每个item的预约信息详见ItemBookInfo
*/
public class BookChildInfo {
/**
* 商品id
*/
private String goods_id;
/**
* 商品sku_idlen <= 64 byte
* 选填
*/
private String sku_id;
/**
* 预售单的item_order_id如果不指定的话会自动分配
*/
private String item_order_id;
/**
* 预约门店的poiId实际存储的是int64类型的值
*/
private String poi_id;
/**
* 预约的开始时间ms13位毫秒时间戳
*/
private Long book_start_time;
/**
*
* 预约的结束时间ms13位毫秒时间戳
* 注意需满足 当前时间< book_start_time < book_end_time并且book_end_time必须是180天之内
*/
private Long book_end_time;
/**
* 用户信息详见UserInfo
* 选填
*/
private List<BookUserInfo> user_info_list;
/**
* 该预约单关联的加价单item_order_idlen <= 64 byte
* 选填
*/
private String markup_item_order_id;
public String getGoods_id() {
return goods_id;
}
public BookChildInfo setGoods_id(String goods_id) {
this.goods_id = goods_id;
return this;
}
public String getSku_id() {
return sku_id;
}
public BookChildInfo setSku_id(String sku_id) {
this.sku_id = sku_id;
return this;
}
public String getItem_order_id() {
return item_order_id;
}
public BookChildInfo setItem_order_id(String item_order_id) {
this.item_order_id = item_order_id;
return this;
}
public String getPoi_id() {
return poi_id;
}
public BookChildInfo setPoi_id(String poi_id) {
this.poi_id = poi_id;
return this;
}
public Long getBook_start_time() {
return book_start_time;
}
public BookChildInfo 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 BookChildInfo setBook_end_time(Long book_end_time) {
this.book_end_time = book_end_time;
return this;
}
public List<BookUserInfo> getUser_info_list() {
return user_info_list;
}
public BookChildInfo setUser_info_list(List<BookUserInfo> user_info_list) {
this.user_info_list = user_info_list;
return this;
}
public String getMarkup_item_order_id() {
return markup_item_order_id;
}
public BookChildInfo setMarkup_item_order_id(String markup_item_order_id) {
this.markup_item_order_id = markup_item_order_id;
return this;
}
}

View File

@ -0,0 +1,96 @@
package com.dyj.applet.domain;
import java.util.List;
public class BookInfo {
/**
* 预约单号len <= 64 byte
*/
private String book_id;
/**
* 商户单号len <= 64 byte
*/
private String order_id;
/**
* 预约状态
* BOOKING 预约中
* SUCCESS 预约成功
* FINISH 预约完成(已核销
* CANCEL 预约取消
* FAIL 预约失败
*/
private String status;
/**
* 预约子单信息详见BookChildInfo
*/
private List<BookChildInfo> book_child_info_list;
/**
* 该预约单关联的加价单idlen <= 64 byte
* 选填
*/
private String markup_order_id;
/**
* 外部预约单号len <= 64 byte
*/
private String out_book_no;
public String getBook_id() {
return book_id;
}
public BookInfo setBook_id(String book_id) {
this.book_id = book_id;
return this;
}
public String getOrder_id() {
return order_id;
}
public BookInfo setOrder_id(String order_id) {
this.order_id = order_id;
return this;
}
public String getStatus() {
return status;
}
public BookInfo setStatus(String status) {
this.status = status;
return this;
}
public List<BookChildInfo> getBook_child_info_list() {
return book_child_info_list;
}
public BookInfo setBook_child_info_list(List<BookChildInfo> book_child_info_list) {
this.book_child_info_list = book_child_info_list;
return this;
}
public String getMarkup_order_id() {
return markup_order_id;
}
public BookInfo setMarkup_order_id(String markup_order_id) {
this.markup_order_id = markup_order_id;
return this;
}
public String getOut_book_no() {
return out_book_no;
}
public BookInfo setOut_book_no(String out_book_no) {
this.out_book_no = out_book_no;
return this;
}
}

View File

@ -0,0 +1,79 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.BaseQuery;
public class QueryBookQuery extends BaseQuery {
/**
* 抖音侧订单号len(order_id) <= 64 byte
* 选填
*/
private String order_id;
/**
* 预约单号len(book_id) <= 64 byte
* 选填
*/
private String book_id;
public String getOrder_id() {
return order_id;
}
public QueryBookQuery setOrder_id(String order_id) {
this.order_id = order_id;
return this;
}
public String getBook_id() {
return book_id;
}
public QueryBookQuery setBook_id(String book_id) {
this.book_id = book_id;
return this;
}
public static QueryBookQueryBuilder builder() {
return new QueryBookQueryBuilder();
}
public static final class QueryBookQueryBuilder {
private String order_id;
private String book_id;
private Integer tenantId;
private String clientKey;
private QueryBookQueryBuilder() {
}
public QueryBookQueryBuilder orderId(String orderId) {
this.order_id = orderId;
return this;
}
public QueryBookQueryBuilder bookId(String bookId) {
this.book_id = bookId;
return this;
}
public QueryBookQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public QueryBookQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public QueryBookQuery build() {
QueryBookQuery queryBookQuery = new QueryBookQuery();
queryBookQuery.setOrder_id(order_id);
queryBookQuery.setBook_id(book_id);
queryBookQuery.setTenantId(tenantId);
queryBookQuery.setClientKey(clientKey);
return queryBookQuery;
}
}
}

View File

@ -0,0 +1,19 @@
package com.dyj.applet.domain.vo;
import com.dyj.applet.domain.BookInfo;
import java.util.List;
public class QueryBookVo {
private List<BookInfo> book_info_list;
public List<BookInfo> getBook_info_list() {
return book_info_list;
}
public QueryBookVo setBook_info_list(List<BookInfo> book_info_list) {
this.book_info_list = book_info_list;
return this;
}
}

View File

@ -191,4 +191,12 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{
baseQuery(body);
return getIndustryOpenTransactionClient().userCancelBook(body);
}
/**
* 生活服务交易系统->预约->查询预约单信息
*/
public DataAndExtraVo<List<QueryBookVo>> queryBook(QueryBookQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().queryBook(body);
}
}

View File

@ -553,6 +553,10 @@ public enum DyAppletUrlPathEnum {
*/
USER_CANCEL_BOOK("userCancelBook","/api/apps/trade/v2/book/user_cancel_book"),
/**
* 生活服务交易系统->预约->查询预约单信息
*/
QUERY_BOOK("queryBook","/api/apps/trade/v2/book/query_book"),
;

View File

@ -572,4 +572,17 @@ public class TransactionTest {
);
}
/**
* 生活服务交易系统->预约->查询预约单信息
*/
@Test
public void queryBook(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.queryBook(QueryBookQuery.builder().build())
)
);
}
}