删除标准分享

This commit is contained in:
caozhen
2023-09-14 14:12:18 +08:00
parent 11a35b85e8
commit 9c09e2c1bb
5 changed files with 37 additions and 1 deletions
@@ -29,4 +29,10 @@ public interface ILawsStandardSharingService extends IService<LawsStandardSharin
*/
void deleteByIds(List<String> ids);
/**
* 删除标准分享
*/
void deleteByStandardId(String id);
void deleteByStandardIds(List<String> ids);
}
@@ -1,7 +1,9 @@
package com.jero.modules.personal.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.jero.modules.personal.entity.LawsStandardCollection;
import com.jero.modules.personal.entity.LawsStandardSharing;
import com.jero.modules.personal.mapper.LawsStandardSharingMapper;
import com.jero.modules.personal.service.ILawsStandardSharingService;
@@ -46,7 +48,6 @@ public class LawsStandardSharingServiceImpl extends ServiceImpl<LawsStandardShar
String standardNum = record.getStandardNum();
String standardName = record.getStandardName();
record.setTitle(standardNum + standardName);
}
}
@@ -72,4 +73,21 @@ public class LawsStandardSharingServiceImpl extends ServiceImpl<LawsStandardShar
update(wrapper);
}
@Override
public void deleteByStandardId(String id) {
LambdaQueryWrapper<LawsStandardSharing> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardSharing::getStandardId, id);
remove(wrapper);
}
@Override
public void deleteByStandardIds(List<String> ids) {
if (ids.isEmpty()){
return;
}
LambdaQueryWrapper<LawsStandardSharing> wrapper = new LambdaQueryWrapper<>();
wrapper.in(LawsStandardSharing::getStandardId, ids);
remove(wrapper);
}
}