Commit c685189d authored by 李灿灿's avatar 李灿灿

feat:紧急出险逻辑优化

parent 7b7ee88c
...@@ -6577,17 +6577,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6577,17 +6577,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class}) @Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R urgentUpdateIsUseByIds(List<String> paramList) { public R urgentUpdateIsUseByIds(List<String> paramList) {
List<TInsuranceOperate> operateList = new ArrayList<>(); List<TInsuranceOperate> operateList = new ArrayList<>();
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
if (CollectionUtils.isNotEmpty(paramList)){ if (CollectionUtils.isNotEmpty(paramList)){
paramList.stream().forEach(e ->{ paramList.stream().forEach(e ->{
TInsuranceDetail byId = this.getById(e); TInsuranceDetail byId = this.getById(e);
if (Optional.ofNullable(byId).isPresent()){ if (Optional.ofNullable(byId).isPresent()){
if (byId.getIsUse() != CommonConstants.ONE_INT){ if (byId.getIsUse() != CommonConstants.ONE_INT){
TInsuranceOperate operate = new TInsuranceOperate(); TInsuranceOperate operate = new TInsuranceOperate();
updateWrapper.eq(TInsuranceDetail::getId,byId.getId()) byId.setIsUse(CommonConstants.ONE_INT);
.set(TInsuranceDetail::getIsUse,CommonConstants.ONE_INT) byId.setUpdateTime(LocalDateTime.now());
.set(TInsuranceDetail::getUpdateTime,LocalDateTime.now()); updateById(byId);
update(updateWrapper);
operate.setOperateDesc(InsurancesConstants.URGENT_UPDATE_IS_USE); operate.setOperateDesc(InsurancesConstants.URGENT_UPDATE_IS_USE);
operate.setCreateName(InsurancesConstants.SYSTEM_TRIGGER); operate.setCreateName(InsurancesConstants.SYSTEM_TRIGGER);
operate.setInsuranceDetailId(byId.getId()); operate.setInsuranceDetailId(byId.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment