| | |
| | | package cc.mrbird.febs.dapp.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | | import cc.mrbird.febs.dapp.dto.RecordInPageDto; |
| | |
| | | IPage<DappFundFlowEntity> records = dappFundFlowDao.selectInPage(page, dappFundFlowEntity); |
| | | return records.getRecords(); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DappFundFlowEntity> fundFlowInPage(DappFundFlowEntity dappFundFlowEntity, QueryRequest request) { |
| | | Page<DappFundFlowEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return dappFundFlowDao.selectInPage(page, dappFundFlowEntity); |
| | | } |
| | | |
| | | @Override |
| | | public void withdrawAgreeOrNot(Long id, int type) { |
| | | DappFundFlowEntity fundFlow = dappFundFlowDao.selectById(id); |
| | | if (fundFlow == null) { |
| | | throw new FebsException("数据不存在"); |
| | | } |
| | | |
| | | if (type == 1) { |
| | | fundFlow.setStatus(DappFundFlowEntity.WITHDRAW_STATUS_AGREE); |
| | | } else if (type == 2) { |
| | | fundFlow.setStatus(DappFundFlowEntity.WITHDRAW_STATUS_DISAGREE); |
| | | } else { |
| | | throw new FebsException("参数错误"); |
| | | } |
| | | |
| | | dappFundFlowDao.updateById(fundFlow); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DappWalletCoinEntity> walletCoinInPage(DappWalletCoinEntity walletCoin, QueryRequest request) { |
| | | Page<DappWalletCoinEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return dappWalletCoinDao.selectInPage(walletCoin, page); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DappWalletMineEntity> walletMineInPage(DappWalletMineEntity walletMine, QueryRequest request) { |
| | | Page<DappWalletMineEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return dappWalletMineDao.selectInPage(walletMine, page); |
| | | } |
| | | } |