mirror of
https://gitee.com/dromara/dy-java.git
synced 2024-11-29 18:49:37 +08:00
生活服务交易系统->预约->商家取消预约
This commit is contained in:
parent
eba4ff1c2c
commit
e3091ecc42
@ -2194,6 +2194,14 @@ public class DyAppletClient extends BaseClient {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取抖音号绑定所需的资质模版列表
|
||||
*
|
||||
|
@ -140,4 +140,11 @@ public interface IndustryTransactionClient {
|
||||
*/
|
||||
@Post(value = "bookResultCallback", interceptor = ClientTokenInterceptor.class)
|
||||
DataAndExtraVo<Void> bookResultCallback(@JSONBody BookResultCallbackQuery body);
|
||||
|
||||
/**
|
||||
* 生活服务交易系统->预约->商家取消预约
|
||||
* @param body
|
||||
*/
|
||||
@Post(value = "merchantCancelBook", interceptor = ClientTokenInterceptor.class)
|
||||
DataAndExtraVo<Void> merchantCancelBook(@JSONBody MerchantCancelBookQuery body);
|
||||
}
|
||||
|
@ -0,0 +1,77 @@
|
||||
package com.dyj.applet.domain.query;
|
||||
|
||||
import com.dyj.common.domain.query.BaseQuery;
|
||||
|
||||
public class MerchantCancelBookQuery extends BaseQuery {
|
||||
|
||||
/**
|
||||
* 预约单id,len(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;
|
||||
}
|
||||
}
|
||||
}
|
@ -171,4 +171,14 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{
|
||||
baseQuery(body);
|
||||
return getIndustryOpenTransactionClient().bookResultCallback(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生活服务交易系统->预约->商家取消预约
|
||||
* @param body
|
||||
*/
|
||||
public DataAndExtraVo<Void> merchantCancelBook(MerchantCancelBookQuery body){
|
||||
baseQuery(body);
|
||||
return getIndustryOpenTransactionClient().merchantCancelBook(body);
|
||||
}
|
||||
}
|
||||
|
@ -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"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
@ -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())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user