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

Merge branch 'feature-licancan' into 'feature/insurance-1.3.0'

feat:紧急出险逻辑优化

See merge request !301
parents 800b5c38 c685189d
......@@ -6577,17 +6577,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R urgentUpdateIsUseByIds(List<String> paramList) {
List<TInsuranceOperate> operateList = new ArrayList<>();
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
if (CollectionUtils.isNotEmpty(paramList)){
paramList.stream().forEach(e ->{
TInsuranceDetail byId = this.getById(e);
if (Optional.ofNullable(byId).isPresent()){
if (byId.getIsUse() != CommonConstants.ONE_INT){
TInsuranceOperate operate = new TInsuranceOperate();
updateWrapper.eq(TInsuranceDetail::getId,byId.getId())
.set(TInsuranceDetail::getIsUse,CommonConstants.ONE_INT)
.set(TInsuranceDetail::getUpdateTime,LocalDateTime.now());
update(updateWrapper);
byId.setIsUse(CommonConstants.ONE_INT);
byId.setUpdateTime(LocalDateTime.now());
updateById(byId);
operate.setOperateDesc(InsurancesConstants.URGENT_UPDATE_IS_USE);
operate.setCreateName(InsurancesConstants.SYSTEM_TRIGGER);
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