页面装修修改,后端只负责存取

This commit is contained in:
jason
2023-06-24 00:10:55 +08:00
parent 1dfbe45913
commit ad1f656dfa
25 changed files with 352 additions and 439 deletions

View File

@ -113,7 +113,6 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> {
Db.saveBatch(entities, size);
}
// @芋艿 是不是叫 updateByDo 或者 updateByEntity 更合适;回复:因为是使用实体作为条件去批量更新,所以没加 ByEntity保持和 mybatis plus 风格一致
default void updateBatch(T update) {
update(update, new QueryWrapper<>());
}
@ -131,4 +130,12 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> {
Db.updateBatchById(entities, size);
}
/**
* 批量修改插入, 会根据实体的主键是否为空,更新还是修改。默认为 1000
* @param entities 实体们
*/
default void saveOrUpdateBatch(Collection<T> entities){
Db.saveOrUpdateBatch(entities);
}
}