提交 649fc42a 编写于 作者: zhouweidong's avatar zhouweidong

虚拟联合主键

上级 9af348d0
......@@ -933,16 +933,23 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
private boolean updateBatchById(List<${item.getCodeName()}> ets, int batchSize){
for(${item.getCodeName()} et: ets){
if(!updateById(et))
throw new BadRequestAlertException(String.format("更新[{}]数据失败",et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),"","");
updateById(et);
}
return true;
}
public boolean removeByIds(List<${srfr7javatype(keyfield.getStdDataType())}> ids){
for(${srfr7javatype(keyfield.getStdDataType())} id:ids){
if(!removeById(id))
throw new BadRequestAlertException(String.format("删除[{}]数据失败",id),"","");
public boolean removeByIds(Collection<? extends Serializable> ids){
for(Serializable id: ids){
if(ObjectUtils.isEmpty(id))
throw new BadRequestAlertException("删除数据失败,主键不允许为空","${item.codeName}","removeByIds");
removeById((${srfr7javatype(keyfield.getStdDataType())})id);
}
return true;
}
public boolean saveOrUpdateBatch(Collection<${item.getCodeName()}> ets, int batchSize) {
for(${item.getCodeName()} et:ets){
saveOrUpdate(et);
}
return true;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册