This commit is contained in:
2023-10-13 12:52:55 +08:00
parent 332ea634ad
commit 27383d989a
2 changed files with 9 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
package com.njcn.csdevice.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
import com.njcn.csdevice.pojo.po.CsLinePO;
@@ -38,7 +39,11 @@ public class CsDevCapacityPOServiceImpl extends ServiceImpl<CsDevCapacityPOMappe
@Override
public void addList(List<CsDevCapacityPO> list) {
this.saveOrUpdateBatch(list);
String line = list.get(0).getLineId();
LambdaQueryWrapper<CsDevCapacityPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(CsDevCapacityPO::getLineId,line);
this.remove(lambdaQueryWrapper);
this.saveBatch(list);
}
@Override