xiaoyong931011
2020-06-09 33bf873937ae03b96ce6d217c24d0b403b4468a1
src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
@@ -19,6 +19,8 @@
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;
@@ -32,6 +34,7 @@
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;
@@ -40,6 +43,9 @@
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;
@@ -399,22 +405,19 @@
   }
   @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