|
|
@ -72,6 +72,7 @@ import com.qs.serve.modules.vtb.service.*; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
import org.springframework.dao.DeadlockLoserDataAccessException; |
|
|
|
import org.springframework.scheduling.annotation.EnableAsync; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -1624,10 +1625,8 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void successCommit(Long verificationId) { |
|
|
|
this.successCommit(verificationId,true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -1645,6 +1644,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
List<Long> centerGoodsIds = activityCenterGoodsOfSubject.stream().map(TbsActivityCenterGoods::getId).collect(Collectors.toList()); |
|
|
|
List<AmountDTO> lastUsedList = vtbFundFlowMapper.listActivityCenterGoodsUsed(centerGoodsIds); |
|
|
|
//统计不匹配金额
|
|
|
|
List<TbsActivityCenterGoods> centerGoodsUpdates = new ArrayList<>(); |
|
|
|
for (int i = 0; i < activityCenterGoodsOfSubject.size(); i++) { |
|
|
|
TbsActivityCenterGoods centerGoods = activityCenterGoodsOfSubject.get(i); |
|
|
|
BigDecimal currentTimeAmount; |
|
|
@ -1673,7 +1673,7 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
TbsActivityCenterGoods updateCenterGoods = new TbsActivityCenterGoods(); |
|
|
|
updateCenterGoods.setId(centerGoods.getId()); |
|
|
|
updateCenterGoods.setUsedAmount(centerGoods.getUsedAmount()); |
|
|
|
activityCenterGoodsService.updateById(updateCenterGoods); |
|
|
|
centerGoodsUpdates.add(updateCenterGoods); |
|
|
|
|
|
|
|
VtbFundFlow fundFlow = CopierUtil.copy(centerGoods,new VtbFundFlow()); |
|
|
|
fundFlow.setId(null); |
|
|
@ -1684,6 +1684,13 @@ public class VtbVerificationServiceImpl extends ServiceImpl<VtbVerificationMappe |
|
|
|
addFundFlowListOfSubject.add(fundFlow); |
|
|
|
} |
|
|
|
addFundFlowList.addAll(addFundFlowListOfSubject); |
|
|
|
if (!centerGoodsUpdates.isEmpty()){ |
|
|
|
try { |
|
|
|
activityCenterGoodsService.updateBatchById(centerGoodsUpdates); |
|
|
|
} catch (DeadlockLoserDataAccessException e) { |
|
|
|
log.warn("检测到死锁,先忽略在修复程序回调更新金额: {}", e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|