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:
@@ -1021,7 +1021,7 @@ public class OrderService {
|
||||
.payMode(OrderPayRecordEnum.WECHATPAY_PAYMENT.getValue())
|
||||
.payAmount(amount)
|
||||
.acquirer(AcquirerEnum.ADAPAY.getValue())
|
||||
.deductionRecord(JSON.toJSONString(Lists.newArrayList(paymentInfo)))
|
||||
.deductionRecord(JSON.toJSONString(paymentInfo))
|
||||
.createBy(null)
|
||||
.delFlag(DelFlagEnum.NORMAL.getValue())
|
||||
.build();
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
import com.jsowell.adapay.service.AdapayService;
|
||||
import com.jsowell.adapay.vo.OrderSettleResult;
|
||||
import com.jsowell.adapay.vo.PaymentInfo;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.ykc.*;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
@@ -367,6 +368,13 @@ public class TempService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询余额订单 分账信息
|
||||
* @param orderCode
|
||||
* @param memberId
|
||||
* @param wechatAppId
|
||||
* @return
|
||||
*/
|
||||
private BigDecimal queryBalanceOrderSettleInfo(String orderCode, String memberId, String wechatAppId) {
|
||||
BigDecimal resultAmt = BigDecimal.ZERO;
|
||||
// 查询会员余额支付记录
|
||||
@@ -394,6 +402,11 @@ public class TempService {
|
||||
return resultAmt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询未分账订单
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> queryUndividedOrder(SettleOrderReportDTO dto) {
|
||||
Map<String, Object> resultMap = Maps.newHashMap();
|
||||
|
||||
@@ -451,7 +464,13 @@ public class TempService {
|
||||
|
||||
}
|
||||
|
||||
public void doBalancePaymentTemp(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String appId) {
|
||||
/**
|
||||
* 余额支付分账
|
||||
* @param orderBasicInfo
|
||||
* @param adapayMemberAccount
|
||||
* @param wechatAppId
|
||||
*/
|
||||
public void doBalancePaymentTemp(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException {
|
||||
String orderCode = orderBasicInfo.getOrderCode();
|
||||
// 查询订单支付记录
|
||||
List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
|
||||
@@ -461,15 +480,38 @@ public class TempService {
|
||||
OrderPayRecord record = orderPayRecordList.get(0);
|
||||
String deductionRecord = record.getDeductionRecord();
|
||||
AbstractOrderLogic orderLogic = new DelayMerchantOrderLogic();
|
||||
List<JSONObject> jsonObjects = orderLogic.parseDeductionRecord(deductionRecord);
|
||||
List<PaymentInfo> paymentInfos = orderLogic.parseDeductionRecord(deductionRecord);
|
||||
|
||||
// 通过paymentId查询 分账记录
|
||||
for (PaymentInfo paymentInfo : paymentInfos) {
|
||||
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||
String paymentId = paymentInfo.getPaymentId();
|
||||
dto.setPaymentId(paymentId);
|
||||
dto.setWechatAppId(wechatAppId);
|
||||
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
||||
if (response == null) {
|
||||
continue;
|
||||
}
|
||||
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
||||
if (CollectionUtils.isNotEmpty(confirms)) {
|
||||
for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
||||
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
|
||||
|
||||
// 找到orderCode的分账记录
|
||||
|
||||
// 校验是不是分给正确的商户
|
||||
|
||||
// 撤销原分账
|
||||
|
||||
// 重新分账
|
||||
// 找到orderCode的分账记录
|
||||
if (StringUtils.equals(jsonObject.getString("orderCode"), orderCode)) {
|
||||
// 分账金额
|
||||
BigDecimal confirmAmt = new BigDecimal(confirm.getConfirmAmt());
|
||||
// 校验是不是分给正确的商户
|
||||
String adapayMemberId = jsonObject.getString("adapayMemberId");
|
||||
if (!StringUtils.equals(adapayMemberId, adapayMemberAccount.getAdapayMemberId())) {
|
||||
// 撤销原分账
|
||||
adapayService.createConfirmReverse(confirm.getId(), wechatAppId);
|
||||
// 重新分账
|
||||
adapayService.createPaymentConfirmRequest(paymentId, adapayMemberAccount, confirmAmt, orderCode, wechatAppId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,184 +649,20 @@ public class SpringBootTestController {
|
||||
|
||||
public List<String> getList() {
|
||||
List<String> list = Lists.newArrayList();
|
||||
list.add("002212023090917383210546517965318148096");
|
||||
list.add("002212023090917453610546519740849975296");
|
||||
list.add("002212023091014062610546826975983562752");
|
||||
list.add("002212023091015482810546852654079127552");
|
||||
list.add("002212023091016000210546855562452951040");
|
||||
list.add("002212023091016503810546868298259202048");
|
||||
list.add("002212023091018144710546889475503222784");
|
||||
list.add("002212023091019323410546909049181458432");
|
||||
list.add("002212023091020444610546927217710313472");
|
||||
list.add("002212023091107193610547086980511035392");
|
||||
list.add("002212023091107405110547092327709302784");
|
||||
list.add("002212023091107440110547093123831136256");
|
||||
list.add("002212023091107455410547093596912349184");
|
||||
list.add("002212023091109085710547114500437016576");
|
||||
list.add("002212023091111041010547143493930811392");
|
||||
list.add("002212023091112173710547161976866033664");
|
||||
list.add("002212023091112360110547166608026103808");
|
||||
list.add("002212023091112440810547168651485442048");
|
||||
list.add("002212023091113042510547173757376901120");
|
||||
list.add("002212023091116543410547231677326168064");
|
||||
list.add("002212023091119100310547265770479517696");
|
||||
list.add("002212023091207415810547454995355127808");
|
||||
list.add("002212023091207515110547457484121726976");
|
||||
list.add("002212023091208592210547474477380669440");
|
||||
list.add("002212023091210512010547502653997690880");
|
||||
list.add("002212023091212292310547527328431034368");
|
||||
list.add("002212023091214384710547559893682741248");
|
||||
list.add("002212023091215474510547577248779726848");
|
||||
list.add("002212023091215485210547577530536562688");
|
||||
list.add("002212023091219272210547632517747015680");
|
||||
list.add("002212023091307175910547811347974709248");
|
||||
list.add("002212023091307233710547812764861173760");
|
||||
list.add("002212023091307472810547818770007986176");
|
||||
list.add("002212023091307505110547819619049922560");
|
||||
list.add("002212023091308171210547826253156216832");
|
||||
list.add("002212023091308571010547836310465654784");
|
||||
list.add("002212023091309161910547841127368720384");
|
||||
list.add("002212023091313154710547901392340746240");
|
||||
list.add("002212023091317035210547958793623408640");
|
||||
list.add("002212023091318055310547974397798088704");
|
||||
list.add("002212023091318101710547975507109326848");
|
||||
list.add("002212023091318170510547977215507820544");
|
||||
list.add("002212023091319534210548001532032417792");
|
||||
list.add("002212023091407091010548171519073292288");
|
||||
list.add("002212023091407222610548174857649070080");
|
||||
list.add("002212023091407590810548184091172671488");
|
||||
list.add("002212023091408140710548187863068315648");
|
||||
list.add("002212023091409172710548203803151568896");
|
||||
list.add("002212023091413084310548262002430435328");
|
||||
list.add("002212023091413084610548262013395976192");
|
||||
list.add("002212023091413243810548266008041730048");
|
||||
list.add("002212023091414123610548278079984340992");
|
||||
list.add("002212023091418232610548341203339128832");
|
||||
list.add("002212023091507194910548536587033427968");
|
||||
list.add("002212023091507400710548541696811851776");
|
||||
list.add("002212023091507432510548542525145739264");
|
||||
list.add("002212023091508012910548547071588380672");
|
||||
list.add("002212023091508275710548553731594694656");
|
||||
list.add("002212023091508280710548553772943667200");
|
||||
list.add("002212023091509214610548567276380254208");
|
||||
list.add("002212023091510095610548579398576537600");
|
||||
list.add("002212023091510554010548590908683980800");
|
||||
list.add("002212023091512522610548620290968551424");
|
||||
list.add("002212023091522513710548771082979635200");
|
||||
list.add("002212023091609131510548927520129232896");
|
||||
list.add("002212023091609263110548930858039029760");
|
||||
list.add("002212023091609484610548936459313762304");
|
||||
list.add("002212023091613090410548986866203459584");
|
||||
list.add("002212023091616084610549032089691566080");
|
||||
list.add("002212023091616091010549032189009317888");
|
||||
list.add("002212023091617084910549047199611039744");
|
||||
list.add("002212023091618381210549069696852922368");
|
||||
list.add("002212023091618502110549072751289769984");
|
||||
list.add("002212023091619373510549084639178362880");
|
||||
list.add("002212023091700565010549164979693625344");
|
||||
list.add("002212023091709184210549291279346401280");
|
||||
list.add("002212023091711112010549319623430234112");
|
||||
list.add("002212023091712003810549332031823884288");
|
||||
list.add("002212023091712034710549332825908043776");
|
||||
list.add("002212023091713402810549357154899537920");
|
||||
list.add("002212023091716231010549398102592483328");
|
||||
list.add("002212023091717345610549416161067003904");
|
||||
list.add("002212023091801222510549533808062988288");
|
||||
list.add("002212023091807134010549622201824411648");
|
||||
list.add("002212023091807321810549626890192257024");
|
||||
list.add("002212023091807493610549631244236402688");
|
||||
list.add("002212023091807544510549632541947101184");
|
||||
list.add("002212023091808115410549636855989608448");
|
||||
list.add("002212023091808555110549647919465136128");
|
||||
list.add("002212023091809183410549653634720235520");
|
||||
list.add("002212023091809341710549657588507815936");
|
||||
list.add("002212023091809341310549657574679384064");
|
||||
list.add("002212023091810534510549677586740400128");
|
||||
list.add("002212023091810554610549678097399312384");
|
||||
list.add("002212023091812442910549705456513105920");
|
||||
list.add("002212023091812585510549709085534687232");
|
||||
list.add("002212023091813345610549718149264699392");
|
||||
list.add("002212023091816460510549766254869643264");
|
||||
list.add("002212023091817295010549777264358215680");
|
||||
list.add("002212023091819251410549806308280156160");
|
||||
list.add("002212023091821580610549844777257693184");
|
||||
list.add("002212023091907075010549983123543195648");
|
||||
list.add("002212023091907544610549994934917169152");
|
||||
list.add("002212023091908222010550001869883564032");
|
||||
list.add("002212023091908350410550005075334258688");
|
||||
list.add("002212023091909245610550017623916670976");
|
||||
list.add("002212023091910273610550033395929391104");
|
||||
list.add("002212023091910294710550033943409930240");
|
||||
list.add("002212023091910533510550039933417967616");
|
||||
list.add("002212023091911182510550046181920067584");
|
||||
list.add("002212023091911225310550047307893559296");
|
||||
list.add("002212023091912024910550057355519115264");
|
||||
list.add("002212023091913144510550075458267299840");
|
||||
list.add("002212023091917252810550138553458851840");
|
||||
list.add("002212023092002070310550269815657877504");
|
||||
list.add("002212023092007375710550353090593263616");
|
||||
list.add("002212023092007434710550354556604297216");
|
||||
list.add("002212023092008523310550371864644399104");
|
||||
list.add("002212023092009052410550375094608408576");
|
||||
list.add("002212023092009145910550377507961614336");
|
||||
list.add("002212023092010514010550401839262457856");
|
||||
list.add("002212023092011070010550405700314861568");
|
||||
list.add("002212023092012014210550419462212833280");
|
||||
list.add("002212023092012040710550420070973149184");
|
||||
list.add("002212023092013383010550443822962253824");
|
||||
list.add("002212023092016482910550491635756961792");
|
||||
list.add("002212023092018592810550524598712111104");
|
||||
list.add("002212023092021471410550566818632769536");
|
||||
list.add("002212023092022215710550575553984364544");
|
||||
list.add("002212023092107131110550709246170050560");
|
||||
list.add("002212023092107344510550714671986585600");
|
||||
list.add("002212023092107381110550715533879169024");
|
||||
list.add("002212023092108271410550727880954265600");
|
||||
list.add("002212023092108271610550727886762094592");
|
||||
list.add("002212023092109355510550745162798469120");
|
||||
list.add("002212023092109372610550745547765366784");
|
||||
list.add("002212023092110162610550755359828979712");
|
||||
list.add("002212023092112234410550787394685759488");
|
||||
list.add("002212023092113040710550797560537493504");
|
||||
list.add("002212023092115202810550831871540875264");
|
||||
list.add("002212023092116104910550844545120178176");
|
||||
list.add("002212023092121415710550927878162079744");
|
||||
list.add("002212023092207110610551071106303860736");
|
||||
list.add("002212023092207502210551080988302454784");
|
||||
list.add("002212023092207541810551081978938503168");
|
||||
list.add("002212023092208232910551089324342296576");
|
||||
list.add("002212023092208330710551091749439483904");
|
||||
list.add("002212023092208570310551097772982915072");
|
||||
list.add("002212023092209270610551105331824766976");
|
||||
list.add("002212023092209442310551109682718912512");
|
||||
list.add("002212023092209502210551111190083448832");
|
||||
list.add("002212023092210240510551119671918510080");
|
||||
list.add("002212023092210261410551120216397889536");
|
||||
list.add("002212023092212381010551153415916953600");
|
||||
list.add("002212023092212523510551157045414875136");
|
||||
list.add("002212023092213444910551170191887032320");
|
||||
list.add("002212023092216265410551210980878499840");
|
||||
list.add("002212023092309045610551462141222735872");
|
||||
list.add("002212023092309213210551466319008894976");
|
||||
list.add("002212023092312083710551508369685327872");
|
||||
list.add("002212023092312483510551518424240140288");
|
||||
list.add("002212023092313133010551524695988535296");
|
||||
list.add("002212023092313230210551527094713569280");
|
||||
list.add("002212023092315212210551556873280471040");
|
||||
list.add("002212023092315585310551566318464012288");
|
||||
list.add("002212023092316385710551576400348442624");
|
||||
list.add("002212023092317063010551583333527080960");
|
||||
list.add("002212023092318282710551603956287877120");
|
||||
list.add("002212023092319432310551622811899113472");
|
||||
list.add("002212023092410434410551849396350562304");
|
||||
list.add("002212023092410583410551853127554220032");
|
||||
list.add("002212023092411273410551860425099751424");
|
||||
list.add("002212023092413394110551893672208920576");
|
||||
list.add("002212023092414110610551901580878655488");
|
||||
list.add("002212023092416503110551941698212245504");
|
||||
list.add("002212023092417444510551955347514400768");
|
||||
list.add("002212023092418131310551962511213932544");
|
||||
list.add("002212023092419315110551982298488496128");
|
||||
|
||||
list.add("002212023081810343910538438757048369152");
|
||||
list.add("002212023081810394810538440051528208384");
|
||||
list.add("002212023081810591710538444957610070016");
|
||||
list.add("002212023082007264910539116261519839232");
|
||||
list.add("002212023082315061310540319039569416192");
|
||||
list.add("002212023082517523910541085700653858816");
|
||||
list.add("002212023090311530510544256700325359616");
|
||||
list.add("002212023090508594310544937850162507776");
|
||||
list.add("002212023090510434610544964032331935744");
|
||||
list.add("002212023091816330510549762982187020288");
|
||||
list.add("002212023092217404210551229552399822848");
|
||||
list.add("002212023092410581410551853044799668224");
|
||||
list.add("002212023092419070010551976045300858880");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user