mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 校验支付单
This commit is contained in:
@@ -6,7 +6,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.huifu.adapay.model.Payment;
|
||||
import com.jsowell.adapay.common.AdaPayment;
|
||||
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||
import com.jsowell.adapay.response.PaymentConfirmResponse;
|
||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
@@ -15,7 +15,6 @@ import com.jsowell.adapay.vo.OrderSettleResult;
|
||||
import com.jsowell.adapay.vo.PaymentInfo;
|
||||
import com.jsowell.common.enums.ykc.*;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.ApplyRefundDTO;
|
||||
@@ -502,23 +501,17 @@ public class TempService {
|
||||
* @param dto
|
||||
*/
|
||||
public void checkPayment(QueryOrderDTO dto) throws BaseAdaPayException {
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
String appId = "app_d0c80cb1-ffc8-48cb-a030-fe9bec823aaa";
|
||||
long begin = DateUtils.dateStrToTimestamp(dto.getStartTime()); // 13位时间戳
|
||||
long end = DateUtils.dateStrToTimestamp(dto.getEndTime()); // 13位时间戳
|
||||
// 根据时间段查询支付对象列表
|
||||
Map<String, Object> queryListParam = Maps.newHashMap();
|
||||
queryListParam.put("app_id", appId);
|
||||
queryListParam.put("page_index", "1");
|
||||
queryListParam.put("page_size", "20");
|
||||
queryListParam.put("created_gte", begin);
|
||||
queryListParam.put("created_lte", end);
|
||||
List<AdaPayment> adaPayments = adapayService.queryPaymentList(dto.getStartTime(), dto.getEndTime());
|
||||
if (CollectionUtils.isEmpty(adaPayments)) {
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("查询支付对象列表请求参数:" + JSON.toJSONString(queryListParam));
|
||||
Map<String, Object> paymentListResult = Payment.queryList(queryListParam, wechatAppId);
|
||||
System.out.println("查询支付对象列表result:" + JSON.toJSONString(paymentListResult));
|
||||
// 查询退款信息
|
||||
for (AdaPayment adaPayment : adaPayments) {
|
||||
String pay_mode = adaPayment.getPay_mode();
|
||||
if (StringUtils.isBlank(pay_mode)) {
|
||||
|
||||
// 查询分账信息
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,8 +237,10 @@ public class SpringBootTestController {
|
||||
@Test
|
||||
public void checkPaymentTest() {
|
||||
QueryOrderDTO dto = new QueryOrderDTO();
|
||||
dto.setStartTime("2023-07-01 00:00:00");
|
||||
dto.setEndTime("2023-07-01 23:59:59");
|
||||
String startTime = "2023-07-01 00:00:00";
|
||||
String endTime = "2023-07-31 23:59:59";
|
||||
dto.setStartTime(startTime);
|
||||
dto.setEndTime(endTime);
|
||||
|
||||
try {
|
||||
tempService.checkPayment(dto);
|
||||
|
||||
Reference in New Issue
Block a user