修复钱包 GAME_OPEN 重复单幂等
This commit is contained in:
parent
5951344b1e
commit
5dd445dfee
@ -23,26 +23,26 @@ public class WalletGoldAssetRecordServiceImpl extends
|
||||
WalletGoldAssetRecordService {
|
||||
|
||||
@Override
|
||||
public boolean existsRecent(Long id) {
|
||||
return Optional.ofNullable(
|
||||
query().select(WalletGoldAssetRecord::getId)
|
||||
.eq(WalletGoldAssetRecord::getId, id)
|
||||
.ge(WalletGoldAssetRecord::getCreateTime, DateUtils.nowPlusDays(3))
|
||||
.last(PageConstant.LIMIT_ONE).getOne())
|
||||
.map(res -> Objects.nonNull(res.getId()))
|
||||
.orElse(Boolean.FALSE);
|
||||
}
|
||||
public boolean existsRecent(Long id) {
|
||||
return Optional.ofNullable(
|
||||
query().select(WalletGoldAssetRecord::getId)
|
||||
.eq(WalletGoldAssetRecord::getId, id)
|
||||
.ge(WalletGoldAssetRecord::getCreateTime, DateUtils.nowMinusDays(3))
|
||||
.last(PageConstant.LIMIT_ONE).getOne())
|
||||
.map(res -> Objects.nonNull(res.getId()))
|
||||
.orElse(Boolean.FALSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean existsRecentEventId(String eventId) {
|
||||
return Optional.ofNullable(
|
||||
query().select(WalletGoldAssetRecord::getId)
|
||||
.eq(WalletGoldAssetRecord::getEventId, eventId)
|
||||
.ge(WalletGoldAssetRecord::getCreateTime, DateUtils.nowPlusDays(3))
|
||||
.last(PageConstant.LIMIT_ONE).getOne())
|
||||
.map(res -> Objects.nonNull(res.getId()))
|
||||
.orElse(Boolean.FALSE);
|
||||
}
|
||||
public boolean existsRecentEventId(String eventId) {
|
||||
return Optional.ofNullable(
|
||||
query().select(WalletGoldAssetRecord::getId)
|
||||
.eq(WalletGoldAssetRecord::getEventId, eventId)
|
||||
.ge(WalletGoldAssetRecord::getCreateTime, DateUtils.nowMinusDays(3))
|
||||
.last(PageConstant.LIMIT_ONE).getOne())
|
||||
.map(res -> Objects.nonNull(res.getId()))
|
||||
.orElse(Boolean.FALSE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WalletGoldAssetRecord> listThisMonth(String sysOrigin, Long userId, Integer type,
|
||||
|
||||
@ -124,15 +124,15 @@ public class WalletGoldGatewayImpl implements WalletGoldGateway {
|
||||
return "WG_RQ:" + receipt.getReqTraceId();
|
||||
}
|
||||
|
||||
private static boolean existsEvent(String eventType) {
|
||||
if (StringUtils.isBlank(eventType)) {
|
||||
return false;
|
||||
}
|
||||
List<String> markLabels = List.of("COMPENSATE_ORDER", "GIFT");
|
||||
for (String labels : markLabels) {
|
||||
if (eventType.contains(labels)) {
|
||||
return true;
|
||||
}
|
||||
private static boolean existsEvent(String eventType) {
|
||||
if (StringUtils.isBlank(eventType)) {
|
||||
return false;
|
||||
}
|
||||
List<String> markLabels = List.of("COMPENSATE_ORDER", "GIFT", "GAME_OPEN");
|
||||
for (String labels : markLabels) {
|
||||
if (eventType.contains(labels)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user