| | |
| | | |
| | | @Override |
| | | public PageInfo<TbAcHistoryPower> findSearch(Integer page, Integer limit, TbAcHistoryPower acHistoryPower) { |
| | | QueryWrapper queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.orderByDesc("addtime"); |
| | | queryWrapper.like("anchorId",acHistoryPower.getAnchorId()); |
| | | PageHelper.startPage(page,limit); |
| | | List<TbAcHistoryPower> cardList = baseMapper.selectList(queryWrapper); |
| | | List<TbAcHistoryPower> cardList = null; |
| | | if (acHistoryPower.getAddtime() == null){ |
| | | LocalDate currentDate = LocalDate.now(); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | String formattedDate = currentDate.format(formatter); |
| | | acHistoryPower.setAddtime(formattedDate); |
| | | cardList = acHistroyPowerDao.findSearch(acHistoryPower); |
| | | }else{ |
| | | cardList = acHistroyPowerDao.findSearch(acHistoryPower); |
| | | } |
| | | PageInfo<TbAcHistoryPower> info = new PageInfo<>(cardList); |
| | | return info; |
| | | } |