| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.xcong.excoin.common.LoginUserUtils;
|
| | | import com.xcong.excoin.common.enumerates.MemberWalletCoinEnum;
|
| | |
| | | import com.xcong.excoin.modules.coin.entity.OrderCoinsEntity;
|
| | | import com.xcong.excoin.modules.coin.mapper.OrderWalletCoinDealMapper;
|
| | | import com.xcong.excoin.modules.coin.mapper.OrderWalletCoinMapper;
|
| | | import com.xcong.excoin.modules.coin.parameter.dto.FindAllWalletCoinOrderDto;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.FindCollectListVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.MemberSelectSymbolsVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealListVo;
|
| | |
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.TransactionPageOfWalletCoinVo;
|
| | | import com.xcong.excoin.modules.coin.service.OrderCoinService;
|
| | | import com.xcong.excoin.modules.contract.entity.ContractOrderEntity;
|
| | | import com.xcong.excoin.modules.contract.mapper.ContractOrderEntityMapper;
|
| | | import com.xcong.excoin.modules.contract.parameter.vo.OrderListVo;
|
| | | import com.xcong.excoin.modules.member.dao.MemberWalletCoinDao;
|
| | | import com.xcong.excoin.modules.member.entity.MemberSelectSymbolsEntity;
|
| | | import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public Result findAllWalletCoinOrder(String symbol) {
|
| | | public Result findAllWalletCoinOrder(FindAllWalletCoinOrderDto findAllWalletCoinOrderDto) {
|
| | | //获取用户ID
|
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId();
|
| | |
|
| | | OrderWalletCoinDealListVo orderWalletCoinDealListVo = new OrderWalletCoinDealListVo();
|
| | | List<OrderWalletCoinDealVo> arrayList = new ArrayList<OrderWalletCoinDealVo>();
|
| | | Page<OrderCoinsDealEntity> page = new Page<>(findAllWalletCoinOrderDto.getPageNum(), findAllWalletCoinOrderDto.getPageSize());
|
| | | OrderCoinsDealEntity orderCoinsDealEntity = new OrderCoinsDealEntity();
|
| | | orderCoinsDealEntity.setMemberId(memberId);
|
| | | orderCoinsDealEntity.setSymbol(findAllWalletCoinOrderDto.getSymbol());
|
| | | IPage<OrderCoinsDealEntity> list = orderCoinDealDao.findAllWalletCoinOrderInPage(page, orderCoinsDealEntity);
|
| | |
|
| | | List<OrderCoinsDealEntity> selectAllWalletCoinOrder = orderCoinDealDao.selectAllWalletCoinOrderBySymbol(memberId,symbol);
|
| | | if(CollUtil.isNotEmpty(selectAllWalletCoinOrder)) {
|
| | | for(OrderCoinsDealEntity orderCoinsDealEntity: selectAllWalletCoinOrder) {
|
| | | OrderWalletCoinDealVo entityToVo = OrderWalletCoinDealMapper.INSTANCE.entityToVoOrder(orderCoinsDealEntity);
|
| | | arrayList.add(entityToVo);
|
| | | }
|
| | | }
|
| | | orderWalletCoinDealListVo.setOrderWalletCoinDealVo(arrayList);
|
| | | return Result.ok(orderWalletCoinDealListVo);
|
| | | Page<OrderWalletCoinDealVo> pageEntityToPageVo = OrderWalletCoinDealMapper.INSTANCE.pageEntityToPageVo(list);
|
| | | |
| | | return Result.ok(pageEntityToPageVo);
|
| | | }
|
| | |
|
| | | @Override
|