提现手续费改为参数传入

This commit is contained in:
Guoqs
2025-02-13 11:49:52 +08:00
parent cbff91cada
commit cd3aced52f
5 changed files with 32 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
package com.jsowell.quartz.task;
import com.google.common.collect.Lists;
import com.huifu.adapay.core.exception.BaseAdaPayException;
import com.jsowell.adapay.dto.WithdrawDTO;
import com.jsowell.adapay.service.AdapayService;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.redis.RedisCache;
@@ -16,14 +18,11 @@ import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.base.StationInfoVO;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import com.jsowell.thirdparty.amap.service.AMapService;
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
@@ -60,6 +59,9 @@ public class JsowellTask {
@Autowired
private AMapService aMapService;
@Autowired
private AdapayService adapayService;
@Autowired
private SettleOrderReportService settleOrderReportService;
@@ -220,5 +222,23 @@ public class JsowellTask {
log.error("处理订单分账异常, merchantId:{}", merchant.getId(), e);
}
});
// TODO 换为实时分账后, 此方法改为 自动提现并计算前一天的分账信息
}
/**
* 自动提现并计算前一天的分账信息
* automaticPayouts
*/
private void automaticPayouts(String merchantId) {
WithdrawDTO dto = new WithdrawDTO();
dto.setMerchantId(merchantId);
dto.setFeeAmt("0");
try {
adapayService.drawCash(dto);
} catch (BaseAdaPayException e) {
throw new RuntimeException(e);
}
}
}