| | |
| | | * @param idList 主键ID集合 |
| | | * @return 查询到的VO对象列表 |
| | | */ |
| | | default List<V> selectVoBatchIds(Collection<? extends Serializable> idList) { |
| | | return selectVoBatchIds(idList, this.currentVoClass()); |
| | | default List<V> selectVoByIds(Collection<? extends Serializable> idList) { |
| | | return selectVoByIds(idList, this.currentVoClass()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param <C> VO类的类型 |
| | | * @return 查询到的VO对象列表,经过转换为指定的VO类后返回 |
| | | */ |
| | | default <C> List<C> selectVoBatchIds(Collection<? extends Serializable> idList, Class<C> voClass) { |
| | | List<T> list = this.selectBatchIds(idList); |
| | | default <C> List<C> selectVoByIds(Collection<? extends Serializable> idList, Class<C> voClass) { |
| | | List<T> list = this.selectByIds(idList); |
| | | if (CollUtil.isEmpty(list)) { |
| | | return CollUtil.newArrayList(); |
| | | } |
| | |
| | | @DataColumn(key = "deptName", value = "dept_id"), |
| | | @DataColumn(key = "userName", value = "user_id") |
| | | }, joinStr = "AND") |
| | | List<TestDemo> selectBatchIds(@Param(Constants.COLL) Collection<? extends Serializable> idList); |
| | | List<TestDemo> selectByIds(@Param(Constants.COLL) Collection<? extends Serializable> idList); |
| | | |
| | | @Override |
| | | @DataPermission({ |
| | |
| | | public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { |
| | | if (isValid) { |
| | | // 做一些业务上的校验,判断是否需要校验 |
| | | List<TestDemo> list = baseMapper.selectBatchIds(ids); |
| | | List<TestDemo> list = baseMapper.selectByIds(ids); |
| | | if (list.size() != ids.size()) { |
| | | throw new ServiceException("您没有删除权限!"); |
| | | } |
| | |
| | | if (isValid) { |
| | | // 做一些业务上的校验,判断是否需要校验 |
| | | } |
| | | List<SysOss> list = baseMapper.selectBatchIds(ids); |
| | | List<SysOss> list = baseMapper.selectByIds(ids); |
| | | for (SysOss sysOss : list) { |
| | | OssClient storage = OssFactory.instance(sysOss.getService()); |
| | | storage.delete(sysOss.getUrl()); |
| | |
| | | |
| | | @Override |
| | | public List<WfFormManageVo> queryByIds(List<Long> ids) { |
| | | return baseMapper.selectVoBatchIds(ids); |
| | | return baseMapper.selectVoByIds(ids); |
| | | } |
| | | |
| | | /** |