mirror of
https://gitee.com/dromara/dy-java.git
synced 2024-12-01 19:47:44 +08:00
Merge branch 'v1.0.0.0'
This commit is contained in:
commit
551c8a4ccc
@ -2312,6 +2312,32 @@ public class DyAppletClient extends BaseClient {
|
||||
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).createTradeOrder(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券准备
|
||||
* @param body 验券准备请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<TradeDeliveryPrepareVo> tradeDeliveryPrepare(DeliveryPrepareQuery body) {
|
||||
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).tradeDeliveryPrepare(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券
|
||||
* @param body 验券准备请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<TradeDeliveryVerifyVo> tradeDeliveryVerify(DeliveryVerifyQuery body) {
|
||||
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).tradeDeliveryVerify(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->查询劵状态信息
|
||||
* @param body 查询劵状态信息请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<List<QueryIndustryItemOrderInfo>> queryItemOrderInfo(QueryIndustryItemOrderInfoQuery body) {
|
||||
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).queryItemOrderInfo(body);
|
||||
}
|
||||
/**
|
||||
* 获取抖音号绑定所需的资质模版列表
|
||||
*
|
||||
|
@ -5,6 +5,7 @@ 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.QueryIndustryItemOrderInfo;
|
||||
import com.dyj.applet.domain.query.*;
|
||||
import com.dyj.applet.domain.vo.*;
|
||||
import com.dyj.common.domain.DataAndExtraVo;
|
||||
@ -242,4 +243,28 @@ public interface IndustryTransactionClient {
|
||||
*/
|
||||
@Post(value = "${createTradeOrder}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<PreCreateIndustryOrderVo> createTradeOrder(@JSONBody CreateTradeOrderQuery body);
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券准备
|
||||
* @param body 验券准备请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${tradeDeliveryPrepare}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<TradeDeliveryPrepareVo> tradeDeliveryPrepare(@JSONBody DeliveryPrepareQuery body);
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券
|
||||
* @param body 验券准备请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${tradeDeliveryVerify}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<TradeDeliveryVerifyVo> tradeDeliveryVerify(@JSONBody DeliveryVerifyQuery body);
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->查询劵状态信息
|
||||
* @param body 查询劵状态信息请求值
|
||||
* @return
|
||||
*/
|
||||
@Post(value = "${queryItemOrderInfo}", interceptor = ClientTokenInterceptor.class)
|
||||
DySimpleResult<List<QueryIndustryItemOrderInfo>> queryItemOrderInfo(@JSONBody QueryIndustryItemOrderInfoQuery body);
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.dyj.applet.domain;
|
||||
|
||||
/**
|
||||
* 券的验券结果
|
||||
*/
|
||||
public class TradeDeliveryVerifyVerifyResult {
|
||||
|
||||
/**
|
||||
* 用户券码,核销成功时会将用户券码返回。开发者可用于对账。 选填
|
||||
*/
|
||||
private String certificate_code;
|
||||
/**
|
||||
* 交易系统里对应的商品单 id
|
||||
*/
|
||||
private String item_order_id;
|
||||
/**
|
||||
* 验券结果码,0 表示成功
|
||||
*/
|
||||
private Long result_code;
|
||||
/**
|
||||
* 验券结果 result_code 的说明
|
||||
*/
|
||||
private String result_msg;
|
||||
|
||||
/**
|
||||
* 核销时间,13 位毫秒级时间戳
|
||||
*/
|
||||
private Long verify_time;
|
||||
|
||||
public String getCertificate_code() {
|
||||
return certificate_code;
|
||||
}
|
||||
|
||||
public TradeDeliveryVerifyVerifyResult setCertificate_code(String certificate_code) {
|
||||
this.certificate_code = certificate_code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getItem_order_id() {
|
||||
return item_order_id;
|
||||
}
|
||||
|
||||
public TradeDeliveryVerifyVerifyResult setItem_order_id(String item_order_id) {
|
||||
this.item_order_id = item_order_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getResult_code() {
|
||||
return result_code;
|
||||
}
|
||||
|
||||
public TradeDeliveryVerifyVerifyResult setResult_code(Long result_code) {
|
||||
this.result_code = result_code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getResult_msg() {
|
||||
return result_msg;
|
||||
}
|
||||
|
||||
public TradeDeliveryVerifyVerifyResult setResult_msg(String result_msg) {
|
||||
this.result_msg = result_msg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getVerify_time() {
|
||||
return verify_time;
|
||||
}
|
||||
|
||||
public TradeDeliveryVerifyVerifyResult setVerify_time(Long verify_time) {
|
||||
this.verify_time = verify_time;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.dyj.applet.domain.vo;
|
||||
|
||||
import com.dyj.applet.domain.DeliveryPrepareCertificate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 验券准备返回值
|
||||
*/
|
||||
public class TradeDeliveryPrepareVo {
|
||||
|
||||
/**
|
||||
* 交易系统单号
|
||||
*/
|
||||
private String order_id;
|
||||
/**
|
||||
* 外部单号,开发者系统的交易单号
|
||||
*/
|
||||
private String out_order_no;
|
||||
/**
|
||||
* 一次验券的标识,在验券接口传入
|
||||
*/
|
||||
private String verify_token;
|
||||
/**
|
||||
* 可用券列表
|
||||
*/
|
||||
private List<DeliveryPrepareCertificate> certificates;
|
||||
|
||||
public String getOrder_id() {
|
||||
return order_id;
|
||||
}
|
||||
|
||||
public TradeDeliveryPrepareVo setOrder_id(String order_id) {
|
||||
this.order_id = order_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOut_order_no() {
|
||||
return out_order_no;
|
||||
}
|
||||
|
||||
public TradeDeliveryPrepareVo setOut_order_no(String out_order_no) {
|
||||
this.out_order_no = out_order_no;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getVerify_token() {
|
||||
return verify_token;
|
||||
}
|
||||
|
||||
public TradeDeliveryPrepareVo setVerify_token(String verify_token) {
|
||||
this.verify_token = verify_token;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<DeliveryPrepareCertificate> getCertificates() {
|
||||
return certificates;
|
||||
}
|
||||
|
||||
public TradeDeliveryPrepareVo setCertificates(List<DeliveryPrepareCertificate> certificates) {
|
||||
this.certificates = certificates;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.dyj.applet.domain.vo;
|
||||
|
||||
import com.dyj.applet.domain.DeliveryVerifyVerifyResult;
|
||||
import com.dyj.applet.domain.TradeDeliveryVerifyVerifyResult;
|
||||
import com.dyj.common.domain.vo.BaseVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生活服务交易系统->核销->抖音码->验券
|
||||
*/
|
||||
public class TradeDeliveryVerifyVo {
|
||||
|
||||
/**
|
||||
* 数组,每个券的验券结果
|
||||
*/
|
||||
private List<TradeDeliveryVerifyVerifyResult> verify_results;
|
||||
|
||||
public List<TradeDeliveryVerifyVerifyResult> getVerify_results() {
|
||||
return verify_results;
|
||||
}
|
||||
|
||||
public TradeDeliveryVerifyVo setVerify_results(List<TradeDeliveryVerifyVerifyResult> verify_results) {
|
||||
this.verify_results = verify_results;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ 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.QueryIndustryItemOrderInfo;
|
||||
import com.dyj.applet.domain.query.*;
|
||||
import com.dyj.applet.domain.vo.*;
|
||||
import com.dyj.common.config.AgentConfiguration;
|
||||
@ -305,4 +306,34 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{
|
||||
baseQuery(body);
|
||||
return getIndustryOpenTransactionClient().createTradeOrder(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券准备
|
||||
* @param body 验券准备请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<TradeDeliveryPrepareVo> tradeDeliveryPrepare(DeliveryPrepareQuery body) {
|
||||
baseQuery(body);
|
||||
return getIndustryOpenTransactionClient().tradeDeliveryPrepare(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券
|
||||
* @param body 验券准备请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<TradeDeliveryVerifyVo> tradeDeliveryVerify(DeliveryVerifyQuery body) {
|
||||
baseQuery(body);
|
||||
return getIndustryOpenTransactionClient().tradeDeliveryVerify(body);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->查询劵状态信息
|
||||
* @param body 查询劵状态信息请求值
|
||||
* @return
|
||||
*/
|
||||
public DySimpleResult<List<QueryIndustryItemOrderInfo>> queryItemOrderInfo(QueryIndustryItemOrderInfoQuery body) {
|
||||
baseQuery(body);
|
||||
return getIndustryOpenTransactionClient().queryItemOrderInfo(body);
|
||||
}
|
||||
}
|
||||
|
@ -612,6 +612,24 @@ public enum DyAppletUrlPathEnum {
|
||||
* 行业交易系统->预下单->开发者发起下单
|
||||
*/
|
||||
CREATE_TRADE_ORDER("createTradeOrder","/api/apps/trade/v2/create_order"),
|
||||
|
||||
/**
|
||||
* https://developer.toutiao.com
|
||||
* 行业交易系统->核销->抖音码->验券准备
|
||||
*/
|
||||
TRADE_DELIVERY_PREPARE("tradeDeliveryPrepare", "/api/apps/trade/v2/delivery_prepare"),
|
||||
|
||||
/**
|
||||
* https://developer.toutiao.com
|
||||
* 行业交易系统->核销->抖音码->验券
|
||||
*/
|
||||
TRADE_DELIVERY_VERIFY("tradeDeliveryVerify", "/api/apps/trade/v2/delivery_verify"),
|
||||
|
||||
/**
|
||||
* https://developer.toutiao.com
|
||||
* 行业交易系统->核销->抖音码->查询劵状态信息
|
||||
*/
|
||||
QUERY_ITEM_ORDER_INFO("queryItemOrderInfo", "/api/apps/trade/v2/query_item_order_info"),
|
||||
;
|
||||
|
||||
|
||||
|
@ -726,4 +726,43 @@ public class TransactionTest {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券准备
|
||||
*/
|
||||
@Test
|
||||
public void tradeDeliveryPrepare(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.tradeDeliveryPrepare(DeliveryPrepareQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->验券
|
||||
*/
|
||||
@Test
|
||||
public void tradeDeliveryVerify(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.tradeDeliveryVerify(DeliveryVerifyQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业交易系统->核销->抖音码->查询劵状态信息
|
||||
*/
|
||||
@Test
|
||||
public void queryItemOrderInfo(){
|
||||
DyAppletClient dyAppletClient = new DyAppletClient();
|
||||
System.out.println(
|
||||
JSON.toJSONString(
|
||||
dyAppletClient.queryItemOrderInfo(QueryIndustryItemOrderInfoQuery.builder().build())
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user