Merge branch 'v1.0.0.0'

This commit is contained in:
danmo 2024-09-24 11:09:55 +08:00
commit 60a881c4b0
24 changed files with 1935 additions and 0 deletions

View File

@ -2186,6 +2186,72 @@ public class DyAppletClient extends BaseClient {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).createBook(body);
}
/**
* 生活服务交易系统->预约->预约接单结果回调
* @param body
*/
public DataAndExtraVo<Void> bookResultCallback(BookResultCallbackQuery 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);
}
/**
* 生活服务交易系统->预约->用户取消预约
* @param body
*/
public DataAndExtraVo<Void> userCancelBook(UserCancelBookQuery body){
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);
}
/**
* 生活服务交易系统->预下单->关闭订单
* @return
*/
public DataAndExtraVo<Void> closeOrder(CloseOrderQuery body) {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).closeOrder(body);
}
/**
* 生活服务交易系统->核销->核销工具->查询用户券列表
* @param body
*/
public DataAndExtraVo<QueryUserCertificatesVo> queryUserCertificates(QueryUserCertificatesQuery body){
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryUserCertificates(body);
}
/**
* 生活服务交易系统->核销->核销工具->查询订单可用门店
* @param body
*/
public DataAndExtraVo<QueryCertificatesOrderInfo> orderCanUse(OrderCanUseQuery body) {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).orderCanUse(body);
}
/**
* 生活服务交易系统->核销->核销工具->设置商家展示信息
* @param body
*/
public DySimpleResult<Void> updateMerchantConf(UpdateMerchantConfQuery body) {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).updateMerchantConf(body);
}
/**
* 获取抖音号绑定所需的资质模版列表
*

View File

@ -4,9 +4,11 @@ import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.dyj.applet.domain.QueryAndCalculateMarketingResult;
import com.dyj.applet.domain.QueryCertificatesOrderInfo;
import com.dyj.applet.domain.query.*;
import com.dyj.applet.domain.vo.*;
import com.dyj.common.domain.DataAndExtraVo;
import com.dyj.common.domain.DyExtra;
import com.dyj.common.domain.DySimpleResult;
import com.dyj.common.domain.vo.BaseVo;
import com.dyj.common.interceptor.ClientTokenInterceptor;
@ -132,4 +134,59 @@ public interface IndustryTransactionClient {
*/
@Post(value = "createBook", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<CreateBookVo> createBook(@JSONBody CreateBookQuery body);
/**
* 生活服务交易系统->预约->预约接单结果回调
* @param body
*/
@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);
/**
* 生活服务交易系统->预约->用户取消预约
* @param body
*/
@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);
/**
* 生活服务交易系统->预下单->关闭订单
* @return
*/
@Post(value = "closeOrder", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<Void> closeOrder(@JSONBody CloseOrderQuery body);
/**
* 生活服务交易系统->核销->核销工具->查询用户券列表
* @param body
*/
@Post(value = "queryUserCertificates", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<QueryUserCertificatesVo> queryUserCertificates(@JSONBody QueryUserCertificatesQuery body);
/**
* 生活服务交易系统->核销->核销工具->查询订单可用门店
* @param body
*/
@Post(value = "orderCanUse", interceptor = ClientTokenInterceptor.class)
DataAndExtraVo<QueryCertificatesOrderInfo> orderCanUse(@JSONBody OrderCanUseQuery body);
/**
* 生活服务交易系统->核销->核销工具->设置商家展示信息
* @param body
*/
@Post(value = "updateMerchantConf", interceptor = ClientTokenInterceptor.class)
DySimpleResult<Void> updateMerchantConf(@JSONBody UpdateMerchantConfQuery 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,103 @@
package com.dyj.applet.domain;
public class CertificatesInfo {
/**
* 券ID
*/
private String certificate_id;
/**
* 券相关的sku商品信息详见下方sku_info参数字段说明
*/
private CertificatesSkuInfo sku_info;
/**
* 券相关金额信息详见下方amount参数字段说明
*/
private UserCertificatesAmount amount;
/**
* 券有效时间秒级
*/
private Long expire_time;
/**
* 券有效开始时间秒级
*/
private Long start_time;
/**
* 三方码则返回明文code抖音码不返回
* 选填
*/
private String code;
/**
* 次卡信息详见下方times_card_info参数字段说明
*/
private TimesCardInfo times_card_info;
public String getCertificate_id() {
return certificate_id;
}
public CertificatesInfo setCertificate_id(String certificate_id) {
this.certificate_id = certificate_id;
return this;
}
public CertificatesSkuInfo getSku_info() {
return sku_info;
}
public CertificatesInfo setSku_info(CertificatesSkuInfo sku_info) {
this.sku_info = sku_info;
return this;
}
public UserCertificatesAmount getAmount() {
return amount;
}
public CertificatesInfo setAmount(UserCertificatesAmount amount) {
this.amount = amount;
return this;
}
public Long getExpire_time() {
return expire_time;
}
public CertificatesInfo setExpire_time(Long expire_time) {
this.expire_time = expire_time;
return this;
}
public Long getStart_time() {
return start_time;
}
public CertificatesInfo setStart_time(Long start_time) {
this.start_time = start_time;
return this;
}
public String getCode() {
return code;
}
public CertificatesInfo setCode(String code) {
this.code = code;
return this;
}
public TimesCardInfo getTimes_card_info() {
return times_card_info;
}
public CertificatesInfo setTimes_card_info(TimesCardInfo times_card_info) {
this.times_card_info = times_card_info;
return this;
}
}

View File

@ -0,0 +1,136 @@
package com.dyj.applet.domain;
public class CertificatesSkuInfo {
/**
* sku商品id
*/
private String sku_id;
/**
* 商品名称
*/
private String title;
/**
* 商品类型
* 1 团购券
* 2 代金券
* 3 次卡
*/
private Integer groupon_type;
/**
* 团购市场价单位分
*/
private Long market_price;
/**
* 团购售卖开始时间时间戳单位秒
*/
private Long sold_start_time;
/**
* 商家系统第三方团购id
* 选填
*/
private String third_sku_id;
/**
* 商家团购账号id
*/
private String account_id;
/**
* 商品spu_id
* 选填
*/
private String spu_id;
/**
* 外部商品id
* 选填
*/
private String out_id;
public String getSku_id() {
return sku_id;
}
public CertificatesSkuInfo setSku_id(String sku_id) {
this.sku_id = sku_id;
return this;
}
public String getTitle() {
return title;
}
public CertificatesSkuInfo setTitle(String title) {
this.title = title;
return this;
}
public Integer getGroupon_type() {
return groupon_type;
}
public CertificatesSkuInfo setGroupon_type(Integer groupon_type) {
this.groupon_type = groupon_type;
return this;
}
public Long getMarket_price() {
return market_price;
}
public CertificatesSkuInfo setMarket_price(Long market_price) {
this.market_price = market_price;
return this;
}
public Long getSold_start_time() {
return sold_start_time;
}
public CertificatesSkuInfo setSold_start_time(Long sold_start_time) {
this.sold_start_time = sold_start_time;
return this;
}
public String getThird_sku_id() {
return third_sku_id;
}
public CertificatesSkuInfo setThird_sku_id(String third_sku_id) {
this.third_sku_id = third_sku_id;
return this;
}
public String getAccount_id() {
return account_id;
}
public CertificatesSkuInfo setAccount_id(String account_id) {
this.account_id = account_id;
return this;
}
public String getSpu_id() {
return spu_id;
}
public CertificatesSkuInfo setSpu_id(String spu_id) {
this.spu_id = spu_id;
return this;
}
public String getOut_id() {
return out_id;
}
public CertificatesSkuInfo setOut_id(String out_id) {
this.out_id = out_id;
return this;
}
}

View File

@ -0,0 +1,63 @@
package com.dyj.applet.domain;
public class DeliveryAppInfo {
/**
* 引导文案: 通过query_text查询接口设置
* 选填
*/
private String guidance_text_id;
/**
* 核销/预约按钮文案: 通过query_text查询接口取其id
* 选填
*/
private String button_text_id;
/**
* 详情页按钮文案: 通过query_text查询接口取其id仅到综进家场景可以配置
* 选填
*/
private String detail_page_text_id;
/**
* 二维码展示方式枚举值123
*/
private Integer display_mode;
public String getGuidance_text_id() {
return guidance_text_id;
}
public DeliveryAppInfo setGuidance_text_id(String guidance_text_id) {
this.guidance_text_id = guidance_text_id;
return this;
}
public String getButton_text_id() {
return button_text_id;
}
public DeliveryAppInfo setButton_text_id(String button_text_id) {
this.button_text_id = button_text_id;
return this;
}
public String getDetail_page_text_id() {
return detail_page_text_id;
}
public DeliveryAppInfo setDetail_page_text_id(String detail_page_text_id) {
this.detail_page_text_id = detail_page_text_id;
return this;
}
public Integer getDisplay_mode() {
return display_mode;
}
public DeliveryAppInfo setDisplay_mode(Integer display_mode) {
this.display_mode = display_mode;
return this;
}
}

View File

@ -0,0 +1,64 @@
package com.dyj.applet.domain;
public class ProductDoubleOpenInfo {
/**
* 引导文案: 通过query_text查询接口设置
* 选填
*/
private String guidance_text_id;
/**
* 到店按钮文案: 通过query_text查询接口设置
* 选填
*/
private String arrival_store_button_text_id;
/**
*
* 到家按钮文案: 通过query_text查询接口设置
* 选填
*/
private String arrival_home_button_text_id;
/**
* 二维码展示方式枚举值123
*/
private Integer display_mode;
public String getGuidance_text_id() {
return guidance_text_id;
}
public ProductDoubleOpenInfo setGuidance_text_id(String guidance_text_id) {
this.guidance_text_id = guidance_text_id;
return this;
}
public String getArrival_store_button_text_id() {
return arrival_store_button_text_id;
}
public ProductDoubleOpenInfo setArrival_store_button_text_id(String arrival_store_button_text_id) {
this.arrival_store_button_text_id = arrival_store_button_text_id;
return this;
}
public String getArrival_home_button_text_id() {
return arrival_home_button_text_id;
}
public ProductDoubleOpenInfo setArrival_home_button_text_id(String arrival_home_button_text_id) {
this.arrival_home_button_text_id = arrival_home_button_text_id;
return this;
}
public Integer getDisplay_mode() {
return display_mode;
}
public ProductDoubleOpenInfo setDisplay_mode(Integer display_mode) {
this.display_mode = display_mode;
return this;
}
}

View File

@ -0,0 +1,48 @@
package com.dyj.applet.domain;
import java.util.List;
public class QueryCertificatesOrderInfo {
/**
* 抖音内部交易订单号长度<64byte
*/
private String order_id;
/**
* 此订单的券信息
*/
private List<CertificatesInfo> certificates;
/**
* 是否可用
*/
private Boolean can_use;
public String getOrder_id() {
return order_id;
}
public QueryCertificatesOrderInfo setOrder_id(String order_id) {
this.order_id = order_id;
return this;
}
public List<CertificatesInfo> getCertificates() {
return certificates;
}
public QueryCertificatesOrderInfo setCertificates(List<CertificatesInfo> certificates) {
this.certificates = certificates;
return this;
}
public Boolean getCan_use() {
return can_use;
}
public QueryCertificatesOrderInfo setCan_use(Boolean can_use) {
this.can_use = can_use;
return this;
}
}

View File

@ -0,0 +1,35 @@
package com.dyj.applet.domain;
/**
* 次卡信息
*/
public class TimesCardInfo {
/**
* 总次数
*/
private Long total_times;
/**
* 可用次数
*/
private Long usable_times;
public Long getTotal_times() {
return total_times;
}
public TimesCardInfo setTotal_times(Long total_times) {
this.total_times = total_times;
return this;
}
public Long getUsable_times() {
return usable_times;
}
public TimesCardInfo setUsable_times(Long usable_times) {
this.usable_times = usable_times;
return this;
}
}

View File

@ -0,0 +1,92 @@
package com.dyj.applet.domain;
public class UserCertificatesAmount {
/**
* 券原始金额单位分
*/
private Integer original_amount;
/**
* 用户实付金额单位分
*/
private Integer pay_amount;
/**
* 商家营销金额单位分
* 选填
*/
private Integer merchant_ticket_amount;
/**
* 支付优惠金额单位分
* 选填
*/
private Integer payment_discount_amount;
/**
* 券实付金额=用户实付金额+支付优惠金额单位分
* 选填
*/
private Integer coupon_pay_amount;
/**
* 平台补贴金额单位分
* 选填
*/
private Integer platform_ticket_amount;
public Integer getOriginal_amount() {
return original_amount;
}
public UserCertificatesAmount setOriginal_amount(Integer original_amount) {
this.original_amount = original_amount;
return this;
}
public Integer getPay_amount() {
return pay_amount;
}
public UserCertificatesAmount setPay_amount(Integer pay_amount) {
this.pay_amount = pay_amount;
return this;
}
public Integer getMerchant_ticket_amount() {
return merchant_ticket_amount;
}
public UserCertificatesAmount setMerchant_ticket_amount(Integer merchant_ticket_amount) {
this.merchant_ticket_amount = merchant_ticket_amount;
return this;
}
public Integer getPayment_discount_amount() {
return payment_discount_amount;
}
public UserCertificatesAmount setPayment_discount_amount(Integer payment_discount_amount) {
this.payment_discount_amount = payment_discount_amount;
return this;
}
public Integer getCoupon_pay_amount() {
return coupon_pay_amount;
}
public UserCertificatesAmount setCoupon_pay_amount(Integer coupon_pay_amount) {
this.coupon_pay_amount = coupon_pay_amount;
return this;
}
public Integer getPlatform_ticket_amount() {
return platform_ticket_amount;
}
public UserCertificatesAmount setPlatform_ticket_amount(Integer platform_ticket_amount) {
this.platform_ticket_amount = platform_ticket_amount;
return this;
}
}

View File

@ -0,0 +1,123 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.BaseQuery;
public class BookResultCallbackQuery extends BaseQuery {
/**
* 预约单idlen(book_id) <= 64 byte
*/
private String book_id;
/**
* 预约结果
* 1成功
* 2失败
*/
private Integer result;
/**
* 结果描述/备注信息
*/
private String msg;
/**
* 接单方式
* 1电话接单
* 2商家后台接单
*/
private Integer accept_type;
public String getBook_id() {
return book_id;
}
public BookResultCallbackQuery setBook_id(String book_id) {
this.book_id = book_id;
return this;
}
public Integer getResult() {
return result;
}
public BookResultCallbackQuery setResult(Integer result) {
this.result = result;
return this;
}
public String getMsg() {
return msg;
}
public BookResultCallbackQuery setMsg(String msg) {
this.msg = msg;
return this;
}
public Integer getAccept_type() {
return accept_type;
}
public BookResultCallbackQuery setAccept_type(Integer accept_type) {
this.accept_type = accept_type;
return this;
}
public static BookResultCallbackQueryBuilder builder(){
return new BookResultCallbackQueryBuilder();
}
public static final class BookResultCallbackQueryBuilder {
private String book_id;
private Integer result;
private String msg;
private Integer accept_type;
private Integer tenantId;
private String clientKey;
private BookResultCallbackQueryBuilder() {
}
public BookResultCallbackQueryBuilder bookId(String bookId) {
this.book_id = bookId;
return this;
}
public BookResultCallbackQueryBuilder result(Integer result) {
this.result = result;
return this;
}
public BookResultCallbackQueryBuilder msg(String msg) {
this.msg = msg;
return this;
}
public BookResultCallbackQueryBuilder acceptType(Integer acceptType) {
this.accept_type = acceptType;
return this;
}
public BookResultCallbackQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public BookResultCallbackQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public BookResultCallbackQuery build() {
BookResultCallbackQuery bookResultCallbackQuery = new BookResultCallbackQuery();
bookResultCallbackQuery.setBook_id(book_id);
bookResultCallbackQuery.setResult(result);
bookResultCallbackQuery.setMsg(msg);
bookResultCallbackQuery.setAccept_type(accept_type);
bookResultCallbackQuery.setTenantId(tenantId);
bookResultCallbackQuery.setClientKey(clientKey);
return bookResultCallbackQuery;
}
}
}

View File

@ -0,0 +1,56 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.BaseQuery;
public class CloseOrderQuery extends BaseQuery {
/**
* 抖音开平内部交易订单号通过预下单回调传给开发者服务长度 < 64byte
*/
private String order_id;
public String getOrder_id() {
return order_id;
}
public CloseOrderQuery setOrder_id(String order_id) {
this.order_id = order_id;
return this;
}
public static CloseOrderQueryBuilder builder() {
return new CloseOrderQueryBuilder();
}
public static final class CloseOrderQueryBuilder {
private String order_id;
private Integer tenantId;
private String clientKey;
private CloseOrderQueryBuilder() {
}
public CloseOrderQueryBuilder orderId(String orderId) {
this.order_id = orderId;
return this;
}
public CloseOrderQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public CloseOrderQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public CloseOrderQuery build() {
CloseOrderQuery closeOrderQuery = new CloseOrderQuery();
closeOrderQuery.setOrder_id(order_id);
closeOrderQuery.setTenantId(tenantId);
closeOrderQuery.setClientKey(clientKey);
return closeOrderQuery;
}
}
}

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
*/
private String book_id;
/**
* 取消原因
*/
private 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

@ -0,0 +1,78 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.BaseQuery;
public class OrderCanUseQuery extends BaseQuery {
/**
* 抖音内部交易订单号长度<64byte
*/
private String order_id;
/**
* 适用门店poi_id
* 选填
*/
private String poi_id;
public String getOrder_id() {
return order_id;
}
public OrderCanUseQuery setOrder_id(String order_id) {
this.order_id = order_id;
return this;
}
public String getPoi_id() {
return poi_id;
}
public OrderCanUseQuery setPoi_id(String poi_id) {
this.poi_id = poi_id;
return this;
}
public static OrderCanUseQueryBuilder builder() {
return new OrderCanUseQueryBuilder();
}
public static final class OrderCanUseQueryBuilder {
private String order_id;
private String poi_id;
private Integer tenantId;
private String clientKey;
private OrderCanUseQueryBuilder() {
}
public OrderCanUseQueryBuilder orderId(String orderId) {
this.order_id = orderId;
return this;
}
public OrderCanUseQueryBuilder poiId(String poiId) {
this.poi_id = poiId;
return this;
}
public OrderCanUseQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public OrderCanUseQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public OrderCanUseQuery build() {
OrderCanUseQuery orderCanUseQuery = new OrderCanUseQuery();
orderCanUseQuery.setOrder_id(order_id);
orderCanUseQuery.setPoi_id(poi_id);
orderCanUseQuery.setTenantId(tenantId);
orderCanUseQuery.setClientKey(clientKey);
return orderCanUseQuery;
}
}
}

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,152 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.UserInfoQuery;
public class QueryUserCertificatesQuery extends UserInfoQuery {
/**
* 商家团购账号id抖音来客账号id需要先有此商家授权关系才能获取到
*/
private String account_id;
/**
* 适用门店poi_id
* 选填
*/
private String poi_id;
/**
* 分页展示用户券起始页默认1
* 选填
*/
private Integer page;
/**
*
* 分页查询订单数量 page_size <= 50默认50
* 选填
*/
private Integer page_size;
/**
* 1 核销工具(默认) 2混合双开
* 选填
*/
private Integer biz_type;
public String getAccount_id() {
return account_id;
}
public QueryUserCertificatesQuery setAccount_id(String account_id) {
this.account_id = account_id;
return this;
}
public String getPoi_id() {
return poi_id;
}
public QueryUserCertificatesQuery setPoi_id(String poi_id) {
this.poi_id = poi_id;
return this;
}
public Integer getPage() {
return page;
}
public QueryUserCertificatesQuery setPage(Integer page) {
this.page = page;
return this;
}
public Integer getPage_size() {
return page_size;
}
public QueryUserCertificatesQuery setPage_size(Integer page_size) {
this.page_size = page_size;
return this;
}
public Integer getBiz_type() {
return biz_type;
}
public QueryUserCertificatesQuery setBiz_type(Integer biz_type) {
this.biz_type = biz_type;
return this;
}
public static QueryUserCertificatesQueryBuilder builder() {
return new QueryUserCertificatesQueryBuilder();
}
public static final class QueryUserCertificatesQueryBuilder {
private String account_id;
private String poi_id;
private Integer page;
private Integer page_size;
private Integer biz_type;
private String open_id;
private Integer tenantId;
private String clientKey;
private QueryUserCertificatesQueryBuilder() {
}
public QueryUserCertificatesQueryBuilder accountId(String accountId) {
this.account_id = accountId;
return this;
}
public QueryUserCertificatesQueryBuilder poiId(String poiId) {
this.poi_id = poiId;
return this;
}
public QueryUserCertificatesQueryBuilder page(Integer page) {
this.page = page;
return this;
}
public QueryUserCertificatesQueryBuilder pageSize(Integer pageSize) {
this.page_size = pageSize;
return this;
}
public QueryUserCertificatesQueryBuilder bizType(Integer bizType) {
this.biz_type = bizType;
return this;
}
public QueryUserCertificatesQueryBuilder openId(String openId) {
this.open_id = openId;
return this;
}
public QueryUserCertificatesQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public QueryUserCertificatesQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public QueryUserCertificatesQuery build() {
QueryUserCertificatesQuery queryUserCertificatesQuery = new QueryUserCertificatesQuery();
queryUserCertificatesQuery.setAccount_id(account_id);
queryUserCertificatesQuery.setPoi_id(poi_id);
queryUserCertificatesQuery.setPage(page);
queryUserCertificatesQuery.setPage_size(page_size);
queryUserCertificatesQuery.setBiz_type(biz_type);
queryUserCertificatesQuery.setOpen_id(open_id);
queryUserCertificatesQuery.setTenantId(tenantId);
queryUserCertificatesQuery.setClientKey(clientKey);
return queryUserCertificatesQuery;
}
}
}

View File

@ -0,0 +1,122 @@
package com.dyj.applet.domain.query;
import com.dyj.applet.domain.DeliveryAppInfo;
import com.dyj.applet.domain.ProductDoubleOpenInfo;
import com.dyj.common.domain.query.BaseQuery;
public class UpdateMerchantConfQuery extends BaseQuery {
/**
* 商家绑定的小程序类型,0-核销工具1-混合双开
*/
private String bind_biz_type;
/**
* 商家id
*/
private String account_id;
/**
* bind_biz_type=0时需填写核销工具相关信息
*/
private DeliveryAppInfo delivery_app_info;
/**
*
* bind_biz_type=1时需填写混合双开相关信息
*/
private ProductDoubleOpenInfo product_double_open_info;
public String getBind_biz_type() {
return bind_biz_type;
}
public UpdateMerchantConfQuery setBind_biz_type(String bind_biz_type) {
this.bind_biz_type = bind_biz_type;
return this;
}
public String getAccount_id() {
return account_id;
}
public UpdateMerchantConfQuery setAccount_id(String account_id) {
this.account_id = account_id;
return this;
}
public DeliveryAppInfo getDelivery_app_info() {
return delivery_app_info;
}
public UpdateMerchantConfQuery setDelivery_app_info(DeliveryAppInfo delivery_app_info) {
this.delivery_app_info = delivery_app_info;
return this;
}
public ProductDoubleOpenInfo getProduct_double_open_info() {
return product_double_open_info;
}
public UpdateMerchantConfQuery setProduct_double_open_info(ProductDoubleOpenInfo product_double_open_info) {
this.product_double_open_info = product_double_open_info;
return this;
}
public static UpdateMerchantConfQueryBuilder builder() {
return new UpdateMerchantConfQueryBuilder();
}
public static final class UpdateMerchantConfQueryBuilder {
private String bind_biz_type;
private String account_id;
private DeliveryAppInfo delivery_app_info;
private ProductDoubleOpenInfo product_double_open_info;
private Integer tenantId;
private String clientKey;
private UpdateMerchantConfQueryBuilder() {
}
public UpdateMerchantConfQueryBuilder bindBizType(String bindBizType) {
this.bind_biz_type = bindBizType;
return this;
}
public UpdateMerchantConfQueryBuilder accountId(String accountId) {
this.account_id = accountId;
return this;
}
public UpdateMerchantConfQueryBuilder deliveryAppInfo(DeliveryAppInfo deliveryAppInfo) {
this.delivery_app_info = deliveryAppInfo;
return this;
}
public UpdateMerchantConfQueryBuilder productDoubleOpenInfo(ProductDoubleOpenInfo productDoubleOpenInfo) {
this.product_double_open_info = productDoubleOpenInfo;
return this;
}
public UpdateMerchantConfQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public UpdateMerchantConfQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public UpdateMerchantConfQuery build() {
UpdateMerchantConfQuery updateMerchantConfQuery = new UpdateMerchantConfQuery();
updateMerchantConfQuery.setBind_biz_type(bind_biz_type);
updateMerchantConfQuery.setAccount_id(account_id);
updateMerchantConfQuery.setDelivery_app_info(delivery_app_info);
updateMerchantConfQuery.setProduct_double_open_info(product_double_open_info);
updateMerchantConfQuery.setTenantId(tenantId);
updateMerchantConfQuery.setClientKey(clientKey);
return updateMerchantConfQuery;
}
}
}

View File

@ -0,0 +1,86 @@
package com.dyj.applet.domain.query;
import com.dyj.common.domain.query.UserInfoQuery;
import java.util.List;
public class UserCancelBookQuery extends UserInfoQuery {
/**
* 预约单idlen(book_id) <= 64 byte
*/
private String book_id;
/**
* 取消原因
*/
private List<String> cancel_reason;
public String getBook_id() {
return book_id;
}
public UserCancelBookQuery setBook_id(String book_id) {
this.book_id = book_id;
return this;
}
public List<String> getCancel_reason() {
return cancel_reason;
}
public UserCancelBookQuery setCancel_reason(List<String> cancel_reason) {
this.cancel_reason = cancel_reason;
return this;
}
public static UserCancelBookQueryBuilder builder() {
return new UserCancelBookQueryBuilder();
}
public static final class UserCancelBookQueryBuilder {
private String book_id;
private List<String> cancel_reason;
private String open_id;
private Integer tenantId;
private String clientKey;
private UserCancelBookQueryBuilder() {
}
public UserCancelBookQueryBuilder bookId(String bookId) {
this.book_id = bookId;
return this;
}
public UserCancelBookQueryBuilder cancelReason(List<String> cancelReason) {
this.cancel_reason = cancelReason;
return this;
}
public UserCancelBookQueryBuilder openId(String openId) {
this.open_id = openId;
return this;
}
public UserCancelBookQueryBuilder tenantId(Integer tenantId) {
this.tenantId = tenantId;
return this;
}
public UserCancelBookQueryBuilder clientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public UserCancelBookQuery build() {
UserCancelBookQuery userCancelBookQuery = new UserCancelBookQuery();
userCancelBookQuery.setBook_id(book_id);
userCancelBookQuery.setCancel_reason(cancel_reason);
userCancelBookQuery.setOpen_id(open_id);
userCancelBookQuery.setTenantId(tenantId);
userCancelBookQuery.setClientKey(clientKey);
return userCancelBookQuery;
}
}
}

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

@ -0,0 +1,36 @@
package com.dyj.applet.domain.vo;
import com.dyj.applet.domain.QueryCertificatesOrderInfo;
import java.util.List;
public class QueryUserCertificatesVo {
/**
* 抖音订单列表
*/
private List<QueryCertificatesOrderInfo> orders;
/**
* 该用户待使用订单总数
*/
private Long total;
public List<QueryCertificatesOrderInfo> getOrders() {
return orders;
}
public QueryUserCertificatesVo setOrders(List<QueryCertificatesOrderInfo> orders) {
this.orders = orders;
return this;
}
public Long getTotal() {
return total;
}
public QueryUserCertificatesVo setTotal(Long total) {
this.total = total;
return this;
}
}

View File

@ -3,6 +3,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.QueryCertificatesOrderInfo;
import com.dyj.applet.domain.query.*;
import com.dyj.applet.domain.vo.*;
import com.dyj.common.config.AgentConfiguration;
@ -162,4 +163,78 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{
baseQuery(body);
return getIndustryOpenTransactionClient().createBook(body);
}
/**
* 生活服务交易系统->预约->预约接单结果回调
* @param body
*/
public DataAndExtraVo<Void> bookResultCallback(BookResultCallbackQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().bookResultCallback(body);
}
/**
* 生活服务交易系统->预约->商家取消预约
* @param body
*/
public DataAndExtraVo<Void> merchantCancelBook(MerchantCancelBookQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().merchantCancelBook(body);
}
/**
* 生活服务交易系统->预约->用户取消预约
* @param body
*/
public DataAndExtraVo<Void> userCancelBook(UserCancelBookQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().userCancelBook(body);
}
/**
* 生活服务交易系统->预约->查询预约单信息
*/
public DataAndExtraVo<List<QueryBookVo>> queryBook(QueryBookQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().queryBook(body);
}
/**
* 生活服务交易系统->预下单->关闭订单
* @return
*/
public DataAndExtraVo<Void> closeOrder(CloseOrderQuery body) {
baseQuery(body);
return getIndustryOpenTransactionClient().closeOrder(body);
}
/**
* 生活服务交易系统->核销->核销工具->查询用户券列表
* @param body
*/
public DataAndExtraVo<QueryUserCertificatesVo> queryUserCertificates(QueryUserCertificatesQuery body){
baseQuery(body);
return getIndustryOpenTransactionClient().queryUserCertificates(body);
}
/**
* 生活服务交易系统->核销->核销工具->查询订单可用门店
* @param body
*/
public DataAndExtraVo<QueryCertificatesOrderInfo> orderCanUse(OrderCanUseQuery body) {
baseQuery(body);
return getIndustryOpenTransactionClient().orderCanUse(body);
}
/**
* 生活服务交易系统->核销->核销工具->设置商家展示信息
* @param body
*/
public DySimpleResult<Void> updateMerchantConf(UpdateMerchantConfQuery body) {
baseQuery(body);
return getIndustryOpenTransactionClient().updateMerchantConf(body);
}
}

View File

@ -537,6 +537,46 @@ public enum DyAppletUrlPathEnum {
* 生活服务交易系统->预约->创建预约单
*/
CREATE_BOOK("createBook","/api/apps/trade/v2/book/create_book"),
/**
* 生活服务交易系统->预约->预约接单结果回调
*/
BOOK_RESULT_CALLBACK("bookResultCallback","/api/apps/trade/v2/book/book_result_callback"),
/**
* 生活服务交易系统->预约->商家取消预约
*/
MERCHANT_CANCEL_BOOK("merchantCancelBook","/api/apps/trade/v2/book/merchant_cancel_book"),
/**
* 生活服务交易系统->预约->商家取消预约
*/
USER_CANCEL_BOOK("userCancelBook","/api/apps/trade/v2/book/user_cancel_book"),
/**
* 生活服务交易系统->预约->查询预约单信息
*/
QUERY_BOOK("queryBook","/api/apps/trade/v2/book/query_book"),
/**
* 生活服务交易系统->预下单->关闭订单
*/
CLOSE_ORDER("closeOrder","/api/apps/trade/v2/order/close_order"),
/**
* 生活服务交易系统->核销->核销工具->查询用户券列表
*/
QUERY_USER_CERTIFICATES("queryUserCertificates","/api/trade/v2/fulfillment/query_user_certificates"),
/**
* 生活服务交易系统->核销->核销工具->查询订单可用门店
*/
ORDER_CAN_USE("orderCanUse","/api/trade/v2/fulfillment/order_can_use"),
/**
* 生活服务交易系统->核销->核销工具->设置商家展示信息
*/
UPDATE_MERCHANT_CONF("updateMerchantConf","/api/apps/trade/v2/toolkit/update_merchant_conf"),
;

View File

@ -533,4 +533,108 @@ public class TransactionTest {
);
}
/**
* 生活服务交易系统->预约->预约接单结果回调
*/
@Test
public void bookResultCallback(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.bookResultCallback(BookResultCallbackQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->预约->商家取消预约
*/
@Test
public void merchantCancelBook(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.merchantCancelBook(MerchantCancelBookQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->预约->用户取消预约
*/
@Test
public void userCancelBook(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.userCancelBook(UserCancelBookQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->预约->查询预约单信息
*/
@Test
public void queryBook(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.queryBook(QueryBookQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->预下单->关闭订单
*/
@Test
public void closeOrder(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.closeOrder(CloseOrderQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->核销->核销工具->查询用户券列表
*/
@Test
public void queryUserCertificates(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.queryUserCertificates(QueryUserCertificatesQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->核销->核销工具->查询订单可用门店
*/
@Test
public void orderCanUse(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.orderCanUse(OrderCanUseQuery.builder().build())
)
);
}
/**
* 生活服务交易系统->核销->核销工具->设置商家展示信息
*/
@Test
public void updateMerchantConf(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.updateMerchantConf(UpdateMerchantConfQuery.builder().build())
)
);
}
}