| | |
| | | @Override |
| | | public Transactions findOne(Transactions transactions) { |
| | | QueryWrapper<Transactions> wrapper = new QueryWrapper<>(transactions); |
| | | return transactionsMapper.selectOne(wrapper); |
| | | return transactionsMapper.selectOne(wrapper.last(" limit 1")); |
| | | } |
| | | |
| | | @Override |
| | |
| | | QueryWrapper<Transactions> wrapper = new QueryWrapper<>(transactions); |
| | | return transactionsMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<Transactions> findPageForMini(PageWrap pageWrap,String memberId) { |
| | | IPage<Transactions> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<Transactions> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda().eq(Transactions::getMemberId, memberId); |
| | | queryWrapper.orderByDesc("create_date"); |
| | | return PageData.from(transactionsMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |