mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 10:18:42 +08:00 
			
		
		
		
	1. 优化分配菜单的逻辑,使用批量插入
2. 修复 CodegenEngine 生成代码时,Mapper.XML 地址不对
This commit is contained in:
		| @@ -75,12 +75,20 @@ public interface BaseMapperX<T> extends BaseMapper<T> { | ||||
|         return selectList(new LambdaQueryWrapper<T>().in(field, values)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 逐条插入,适合少量数据插入,或者对性能要求不高的场景 | ||||
|      * | ||||
|      * 如果大量,请使用 {@link com.baomidou.mybatisplus.extension.service.impl.ServiceImpl#saveBatch(Collection)} 方法 | ||||
|      * 使用示例,可见 RoleMenuBatchInsertMapper、UserRoleBatchInsertMapper 类 | ||||
|      * | ||||
|      * @param entities 实体们 | ||||
|      */ | ||||
|     default void insertBatch(Collection<T> entities) { | ||||
|         // TODO 芋艿:修改成支持批量的 | ||||
|         entities.forEach(this::insert); | ||||
|     } | ||||
|  | ||||
|     default void updateBatch(T update) { | ||||
|         update(update, new QueryWrapper<>()); | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV