feat: 310412-汇总订单清算还款
parent
6538214d93
commit
2c68ab6357
|
|
@ -91,4 +91,5 @@ public class OrderSettleService {
|
||||||
HttpResponse<OrderSettleQueryBySerialResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), OrderSettleQueryBySerialResponse.class);
|
HttpResponse<OrderSettleQueryBySerialResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), OrderSettleQueryBySerialResponse.class);
|
||||||
return httpResponse.getServiceResponse();
|
return httpResponse.getServiceResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,4 +91,17 @@ public class SummaryOrderService {
|
||||||
HttpResponse<SummaryOrderQueryDetailResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), SummaryOrderQueryDetailResponse.class);
|
HttpResponse<SummaryOrderQueryDetailResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), SummaryOrderQueryDetailResponse.class);
|
||||||
return httpResponse.getServiceResponse();
|
return httpResponse.getServiceResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 310412-汇总订单清算还款
|
||||||
|
*
|
||||||
|
* @author yuchuan
|
||||||
|
* @since 2026/3/16
|
||||||
|
*/
|
||||||
|
public SummaryOrderSettleResponse summaryOrderSettle(SummaryOrderSettleRequest request) {
|
||||||
|
String url = "/summary/order/settle";
|
||||||
|
HttpResponse<SummaryOrderSettleResponse> httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(),
|
||||||
|
request.toJsonRequest(), SummaryOrderSettleResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.czcb.scfs.api.service.v2.order.model;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiRequest;
|
||||||
|
import com.czcb.scfs.api.core.agrs.TransType;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 310412-汇总订单清算还款
|
||||||
|
*
|
||||||
|
* @author yuchuan
|
||||||
|
* @since 2026/3/16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TransType("310412")
|
||||||
|
public class SummaryOrderSettleRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 渠道编号
|
||||||
|
*/
|
||||||
|
@SerializedName("channel_no")
|
||||||
|
private String channelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用编号
|
||||||
|
*/
|
||||||
|
@SerializedName("app_no")
|
||||||
|
private String appNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("serial_no")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日期
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_date")
|
||||||
|
private String transDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_tradetime")
|
||||||
|
private String transTradeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
@SerializedName("order_no")
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清算金额
|
||||||
|
*/
|
||||||
|
@SerializedName("settle_amount")
|
||||||
|
private BigDecimal settleAmount;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
package com.czcb.scfs.api.service.v2.order.model;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiResponse;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 310412-汇总订单清算还款
|
||||||
|
*
|
||||||
|
* @author yuchuan
|
||||||
|
* @since 2026/3/16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SummaryOrderSettleResponse implements ApiResponse {
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_serial_no")
|
||||||
|
private String sysSerialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_time")
|
||||||
|
private String sysTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已清算金额
|
||||||
|
*/
|
||||||
|
@SerializedName("settle_amount")
|
||||||
|
private BigDecimal settleAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已扣点金额
|
||||||
|
*/
|
||||||
|
@SerializedName("deduct_amount")
|
||||||
|
private BigDecimal deductAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已解冻金额
|
||||||
|
*/
|
||||||
|
@SerializedName("unfreeze_amount")
|
||||||
|
private BigDecimal unfreezeAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已还本金金额
|
||||||
|
*/
|
||||||
|
@SerializedName("repay_amount_bj")
|
||||||
|
private BigDecimal repayAmountBj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已付利息金额
|
||||||
|
*/
|
||||||
|
@SerializedName("repay_amount_lx")
|
||||||
|
private BigDecimal repayAmountLx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已付服务费金额
|
||||||
|
*/
|
||||||
|
@SerializedName("pay_fee")
|
||||||
|
private BigDecimal payFee;
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.czcb.scfs.api.test.service;
|
package com.czcb.scfs.api.test.service;
|
||||||
|
|
||||||
import com.czcb.scfs.api.service.v2.order.OrderSettleService;
|
import com.czcb.scfs.api.service.v2.order.OrderSettleService;
|
||||||
|
import com.czcb.scfs.api.service.v2.order.SummaryOrderService;
|
||||||
import com.czcb.scfs.api.service.v2.order.model.*;
|
import com.czcb.scfs.api.service.v2.order.model.*;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,6 +21,8 @@ class OrderServiceTest {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private OrderSettleService orderSettleService;
|
private OrderSettleService orderSettleService;
|
||||||
|
@Resource
|
||||||
|
private SummaryOrderService summaryOrderService;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void orderSettleResultQueryPage() {
|
void orderSettleResultQueryPage() {
|
||||||
|
|
@ -62,5 +66,20 @@ class OrderServiceTest {
|
||||||
System.out.println(response);
|
System.out.println(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void summaryOrderSettle() {
|
||||||
|
SummaryOrderSettleRequest request = new SummaryOrderSettleRequest();
|
||||||
|
request.setChannelNo("1038");
|
||||||
|
request.setAppNo("10");
|
||||||
|
request.setSerialNo(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
request.setTransDate("2024-03-20");
|
||||||
|
request.setTransTradeTime("2024-01-02 09:11:53");
|
||||||
|
request.setOrderNo("202603180001");
|
||||||
|
request.setSettleAmount(BigDecimal.TEN);
|
||||||
|
|
||||||
|
SummaryOrderSettleResponse response = summaryOrderService.summaryOrderSettle(request);
|
||||||
|
System.out.println(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue