mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
查询支付确认对象列表
This commit is contained in:
@@ -13,11 +13,12 @@ import com.google.common.primitives.Bytes;
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.huifu.adapay.model.Refund;
|
||||
import com.jsowell.JsowellApplication;
|
||||
import com.jsowell.adapay.common.DivMember;
|
||||
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
||||
import com.jsowell.adapay.dto.QueryAcctFlowDTO;
|
||||
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||
import com.jsowell.adapay.dto.SettleAccountDTO;
|
||||
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
import com.jsowell.adapay.service.AdapayService;
|
||||
import com.jsowell.adapay.vo.DrawCashDetailVO;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
@@ -235,19 +236,11 @@ public class SpringBootTestController {
|
||||
|
||||
@Test
|
||||
public void queryPaymentConfirmListTest() {
|
||||
// QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||
// dto.setWechatAppId("wxbb3e0d474569481d");
|
||||
// dto.setPaymentId("002212023081523574610537553706393288704");
|
||||
// adapayService.queryPaymentConfirmList(dto);
|
||||
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
DivMember divMember = new DivMember();
|
||||
divMember.setMember_id("adapayMemberAccount.getAdapayMemberId()");
|
||||
divMember.setAmount("AdapayUtil.formatAmount(confirmAmt)");
|
||||
divMember.setFee_flag(Constants.Y);
|
||||
map.put("div_members", Lists.newArrayList(divMember));
|
||||
System.out.println(map);
|
||||
|
||||
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||
dto.setWechatAppId("wxbb3e0d474569481d");
|
||||
dto.setPaymentId("002212023080223561910532842298673803264");
|
||||
QueryPaymentConfirmDetailResponse queryPaymentConfirmDetailResponse = adapayService.queryPaymentConfirmList(dto);
|
||||
System.out.println(queryPaymentConfirmDetailResponse);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -97,6 +97,7 @@
|
||||
<el-table-column label="交易金额" align="center" prop="tradeAmount" />
|
||||
<el-table-column label="交易手续费" align="center" prop="tradeFee" />
|
||||
</el-table>
|
||||
|
||||
<el-dialog title="订单流水" :visible.sync="dialogTableVisible">
|
||||
<span
|
||||
>站点id:{{ getOrderId }} --- 交易日期:{{ getOrderTradeDate }}</span
|
||||
|
||||
Reference in New Issue
Block a user