update 优化汇付结算账户一致性

This commit is contained in:
jsowell
2026-07-16 13:32:43 +08:00
parent b4731d3e85
commit 345a6efb37
10 changed files with 138 additions and 68 deletions

View File

@@ -124,7 +124,10 @@ public interface AdapayMemberAccountMapper {
@Param("merchantId") String merchantId,
@Param("adapayMemberId") String adapayMemberId);
void clearSettleAccountByMerchantId(String merchantId);
int clearCurrentSettleAccount(@Param("id") Integer id,
@Param("merchantId") String merchantId,
@Param("adapayMemberId") String adapayMemberId,
@Param("settleAccountId") String settleAccountId);
/**
* 根据运营商id查询最近一条的信息

View File

@@ -115,7 +115,7 @@ public interface AdapayMemberAccountService {
*/
int deleteCurrentAccount(Integer id, String merchantId, String adapayMemberId);
void clearSettleAccountByMerchantId(String merchantId);
int clearCurrentSettleAccount(Integer id, String merchantId, String adapayMemberId, String settleAccountId);
/**
* 根据运营商Id查询最近一条的信息

View File

@@ -279,9 +279,12 @@ public class AdapayMemberAccountServiceImpl implements AdapayMemberAccountServic
}
@Override
public void clearSettleAccountByMerchantId(String merchantId) {
adapayMemberAccountMapper.clearSettleAccountByMerchantId(merchantId);
redisCache.deleteObject(CacheConstants.ADAPAY_MEMBER_ACCOUNT + merchantId);
public int clearCurrentSettleAccount(Integer id, String merchantId, String adapayMemberId, String settleAccountId) {
int result = adapayMemberAccountMapper.clearCurrentSettleAccount(id, merchantId, adapayMemberId, settleAccountId);
if (result > 0) {
redisCache.deleteObject(CacheConstants.ADAPAY_MEMBER_ACCOUNT + merchantId);
}
return result;
}
/**