mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
查询支付确认对象列表
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
package com.jsowell.adapay.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class QueryPaymentConfirmDTO {
|
||||
/**
|
||||
* 控制台 主页面应用的app_id
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.jsowell.adapay.response;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询支付确认对象详情反参
|
||||
@@ -15,7 +19,7 @@ public class QueryPaymentConfirmDetailResponse extends AdapayBaseResponse{
|
||||
private String prodMode;
|
||||
|
||||
@JSONField(name = "payment_confirms")
|
||||
private String paymentConfirms;
|
||||
private List<PaymentConfirmInfo> paymentConfirms;
|
||||
|
||||
@JSONField(name = "has_more")
|
||||
private Boolean hasMore;
|
||||
@@ -26,7 +30,52 @@ public class QueryPaymentConfirmDetailResponse extends AdapayBaseResponse{
|
||||
@JSONField(name = "object")
|
||||
private String object;
|
||||
|
||||
static class PaymentConfirm {
|
||||
@Getter
|
||||
@Setter
|
||||
static class PaymentConfirmInfo{
|
||||
/**
|
||||
* 返参,必填,由AdaPay生成的支付对象 ID
|
||||
*/
|
||||
@JSONField(name = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 返参,必填,支付创建时的时间戳
|
||||
*/
|
||||
@JSONField(name = "created_time")
|
||||
private String createdTime;
|
||||
|
||||
/**
|
||||
* 必填,订单号
|
||||
*/
|
||||
@JSONField(name = "order_no")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 商户发起支付的应用id,不同的前端应用将无法使用该 Payment 对象完成支付
|
||||
*/
|
||||
@JSONField(name = "app_id")
|
||||
private String appId;
|
||||
|
||||
@JSONField(name = "confirm_amt")
|
||||
private String confirmAmt;
|
||||
|
||||
@JSONField(name = "confirmed_amt")
|
||||
private String confirmedAmt;
|
||||
|
||||
@JSONField(name = "fee_mode")
|
||||
private String feeMode;
|
||||
|
||||
private String description;
|
||||
|
||||
@JSONField(name = "reserved_amt")
|
||||
private String reservedAmt;
|
||||
|
||||
@JSONField(name = "refunded_amt")
|
||||
private String refundedAmt;
|
||||
|
||||
@JSONField(name = "fee_amt")
|
||||
private String feeAmt;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -972,7 +972,7 @@ public class AdapayService {
|
||||
/**
|
||||
* 查询支付确认对象列表
|
||||
*/
|
||||
public void queryPaymentConfirmList(QueryPaymentConfirmDTO dto) {
|
||||
public QueryPaymentConfirmDetailResponse queryPaymentConfirmList(QueryPaymentConfirmDTO dto) {
|
||||
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(dto.getWechatAppId());
|
||||
if (config == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
|
||||
@@ -981,13 +981,15 @@ public class AdapayService {
|
||||
param.put("payment_id", dto.getPaymentId());
|
||||
param.put("app_id", config.getAdapayAppId());
|
||||
|
||||
QueryPaymentConfirmDetailResponse queryPaymentConfirmDetailResponse = null;
|
||||
try {
|
||||
Map<String, Object> map = PaymentConfirm.queryList(param, config.getWechatAppId());
|
||||
QueryPaymentConfirmDetailResponse queryPaymentConfirmDetailResponse = JSON.parseObject(JSON.toJSONString(map), QueryPaymentConfirmDetailResponse.class);
|
||||
log.info("queryPaymentConfirmDetailResponse:{}", JSON.toJSONString(queryPaymentConfirmDetailResponse));
|
||||
queryPaymentConfirmDetailResponse = JSON.parseObject(JSON.toJSONString(map), QueryPaymentConfirmDetailResponse.class);
|
||||
// log.info("queryPaymentConfirmDetailResponse:{}", JSON.toJSONString(queryPaymentConfirmDetailResponse));
|
||||
} catch (BaseAdaPayException e) {
|
||||
log.error("查询支付确认对象列表error", e);
|
||||
}
|
||||
return queryPaymentConfirmDetailResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SettleOrderReportDTO {
|
||||
private String merchantId;
|
||||
|
||||
private String stationId;
|
||||
|
||||
private String tradeDate;
|
||||
|
||||
private Integer pageNum;
|
||||
|
||||
private Integer pageSize;
|
||||
}
|
||||
@@ -7,9 +7,11 @@ import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.SettleOrderReport;
|
||||
import com.jsowell.pile.dto.MerchantOrderReportDTO;
|
||||
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
||||
import com.jsowell.pile.mapper.SettleOrderReportMapper;
|
||||
import com.jsowell.pile.service.ISettleOrderReportService;
|
||||
import com.jsowell.pile.vo.web.MerchantOrderReportVO;
|
||||
import com.jsowell.pile.vo.web.OrderSettleDetailVO;
|
||||
import com.jsowell.pile.vo.web.SettleOrderReportVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -46,6 +48,13 @@ public class SettleOrderReportServiceImpl implements ISettleOrderReportService {
|
||||
return settleOrderReportMapper.selectByStationIdAndDate(stationId, date);
|
||||
}
|
||||
|
||||
public List<OrderSettleDetailVO> selectSettleOrderReportDetail(SettleOrderReportDTO dto) {
|
||||
Integer pageNum = dto.getPageNum() == null ? 1 : dto.getPageNum();
|
||||
Integer pageSize = dto.getPageSize() == null ? 20 : dto.getPageSize();
|
||||
PageUtils.startPage(pageNum, pageSize);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SettleOrderReport> selectByMerchantIdAndDate(String merchantId, String date) {
|
||||
return settleOrderReportMapper.selectByMerchantIdAndDate(merchantId, date);
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 订单结算详情
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class OrderSettleDetailVO {
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 结算金额
|
||||
*/
|
||||
private String settleAmount;
|
||||
|
||||
/**
|
||||
* 清分状态
|
||||
*/
|
||||
private String clearingStatus;
|
||||
|
||||
/**
|
||||
* 清分账单编号
|
||||
*/
|
||||
private String clearingBillCode;
|
||||
|
||||
/**
|
||||
* 提现状态
|
||||
*/
|
||||
private String withdrawStatus;
|
||||
|
||||
/**
|
||||
* 提现编号
|
||||
*/
|
||||
private String withdrawCode;
|
||||
}
|
||||
Reference in New Issue
Block a user