生活服务交易系统->预约->商家取消预约

This commit is contained in:
353259576 2024-09-11 13:52:19 +08:00
parent eba4ff1c2c
commit e3091ecc42
6 changed files with 123 additions and 1 deletions

View File

@ -2194,6 +2194,14 @@ public class DyAppletClient extends BaseClient {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).bookResultCallback(body); return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).bookResultCallback(body);
} }
/**
* 生活服务交易系统->预约->商家取消预约
* @param body
*/
public DataAndExtraVo<Void> merchantCancelBook(MerchantCancelBookQuery body){
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).merchantCancelBook(body);
}
/** /**
* 获取抖音号绑定所需的资质模版列表 * 获取抖音号绑定所需的资质模版列表
* *

View File

@ -140,4 +140,11 @@ public interface IndustryTransactionClient {
*/ */
@Post(value = "bookResultCallback", interceptor = ClientTokenInterceptor.class) @Post(value = "bookResultCallback", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<Void> bookResultCallback(@JSONBody BookResultCallbackQuery body); DataAndExtraVo<Void> bookResultCallback(@JSONBody BookResultCallbackQuery body);
/**
* 生活服务交易系统->预约->商家取消预约
* @param body
*/
@Post(value = "merchantCancelBook", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<Void> merchantCancelBook(@JSONBody MerchantCancelBookQuery body);
} }

View File

@ -0,0 +1,77 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.BaseQuery;
public class MerchantCancelBookQuery extends BaseQuery {
/**
* 预约单idlen(book_id) <= 64 byte
*/
public String book_id;
/**
* 取消原因
*/
public String cancel_reason;
public String getBook_id() {
return book_id;
}
public MerchantCancelBookQuery setBook_id(String book_id) {
this.book_id = book_id;
return this;
}
public String getCancel_reason() {
return cancel_reason;
}
public MerchantCancelBookQuery setCancel_reason(String cancel_reason) {
this.cancel_reason = cancel_reason;
return this;
}
public static MerchantCancelBookQueryBuilder builder() {
return new MerchantCancelBookQueryBuilder();
}
public static final class MerchantCancelBookQueryBuilder {
private String book_id;
private String cancel_reason;
private Integer tenantId;
private String clientKey;
private MerchantCancelBookQueryBuilder() {
}
public MerchantCancelBookQueryBuilder bookId(String bookId) {
this.book_id = bookId;
return this;
}
public MerchantCancelBookQueryBuilder cancelReason(String cancelReason) {
this.cancel_reason = cancelReason;
return this;
}
public MerchantCancelBookQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public MerchantCancelBookQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public MerchantCancelBookQuery build() {
MerchantCancelBookQuery merchantCancelBookQuery = new MerchantCancelBookQuery();
merchantCancelBookQuery.setBook_id(book_id);
merchantCancelBookQuery.setCancel_reason(cancel_reason);
merchantCancelBookQuery.setTenantId(tenantId);
merchantCancelBookQuery.setClientKey(clientKey);
return merchantCancelBookQuery;
}
}
}

View File

@ -171,4 +171,14 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{
baseQuery(body); baseQuery(body);
return getIndustryOpenTransactionClient().bookResultCallback(body); return getIndustryOpenTransactionClient().bookResultCallback(body);
} }
/**
* 生活服务交易系统->预约->商家取消预约
* @param body
*/
public DataAndExtraVo<Void> merchantCancelBook(MerchantCancelBookQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().merchantCancelBook(body);
}
} }

View File

@ -541,7 +541,14 @@ public enum DyAppletUrlPathEnum {
/** /**
* 生活服务交易系统->预约->预约接单结果回调 * 生活服务交易系统->预约->预约接单结果回调
*/ */
BOOK_RESULT_CALLBACK("bookResultCallback","/api/apps/trade/v2/book/book_result_callback") BOOK_RESULT_CALLBACK("bookResultCallback","/api/apps/trade/v2/book/book_result_callback"),
/**
* 生活服务交易系统->预约->商家取消预约
*/
MERCHANT_CANCEL_BOOK("merchantCancelBook","/api/apps/trade/v2/book/merchant_cancel_book"),
; ;

View File

@ -546,4 +546,17 @@ public class TransactionTest {
); );
} }
/**
* 生活服务交易系统->预约->商家取消预约
*/
@Test
public void merchantCancelBook(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.merchantCancelBook(MerchantCancelBookQuery.builder().build())
)
);
}
} }