| | |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.lunhan.xxx.repository.dao; |
| | | package com.lunhan.xxx.repository.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.lunhan.xxx.common.util.NumericUtil; |
| | | import com.lunhan.xxx.common.util.StringUtil; |
| | | import com.lunhan.xxx.entity.dto.OrderByDTO; |
| | | import com.lunhan.xxx.entity.dto.SearchBasicDTO; |
| | | import com.lunhan.xxx.entity.dto.search.SearchTestInfo; |
| | | import com.lunhan.xxx.entity.enums.EOrderBy; |
| | | import com.lunhan.xxx.repository.BasicDao; |
| | | import com.lunhan.xxx.repository.BasicMapperImpl; |
| | | import com.lunhan.xxx.repository.imapper.TestInfoMapper; |
| | | import com.lunhan.xxx.repository.po.TestInfoPO; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 测试信息 数据访问类 |
| | |
| | | */ |
| | | |
| | | @Repository |
| | | public class TestInfoDao extends BasicDao<TestInfoPO> { |
| | | // TestInfoDao() { |
| | | // super(ETestInfo.values()); |
| | | // } |
| | | |
| | | public Boolean removeByListId(List<Long> listId) { |
| | | return super.deleteLogic(listId); |
| | | class TestInfoMapperImpl extends BasicMapperImpl<TestInfoPO> { |
| | | public TestInfoMapperImpl(TestInfoMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | public PagerResult<TestInfoPO> search(SearchTestInfo search) { |
| | | @Override |
| | | public PagerResult<TestInfoPO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchTestInfo search = (SearchTestInfo)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<TestInfoPO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | |
| | | } else { |
| | | queryWrapper.orderByDesc(TestInfoPO::getId); |
| | | } |
| | | return super.getPageList(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | } |
| | | |
| | | public List<TestInfoPO> getListById(List<Long> listId) { |
| | | return super.db.selectBatchIds(listId); |
| | | Page<TestInfoPO> pageResult = DB.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getPages(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | } |