|
|
@@ -1,6 +1,7 @@
|
|
|
package com.jzg.organization.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.jzg.commons.constants.Constants;
|
|
|
@@ -31,7 +32,13 @@ public class PtlAgreementCostTypeServiceImpl extends ServiceImpl<PtlAgreementCos
|
|
|
|
|
|
@Override
|
|
|
public void saveOrUpdateCostType(List<PtlAgreementCostType> ptlAgreementCostTypeList, String id) {
|
|
|
- baseMapper.deleteByPtlAgreementCostId(id);
|
|
|
+// baseMapper.deleteByPtlAgreementCostId(id);
|
|
|
+ // 定义查询条件
|
|
|
+ LambdaQueryWrapper<PtlAgreementCostType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(PtlAgreementCostType::getPtlAgreementCostId, id);
|
|
|
+ // 执行删除操作,返回受影响的行数
|
|
|
+ baseMapper.delete(lambdaQueryWrapper);
|
|
|
+
|
|
|
for (PtlAgreementCostType ptlAgreementCostType : ptlAgreementCostTypeList) {
|
|
|
ptlAgreementCostType.setPtlAgreementCostId(id);
|
|
|
}
|