xiaoyong931011
2020-06-05 68bfb0e22f518b4f328ce96889f3dce0a80be560
src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
@@ -13,9 +13,12 @@
import javax.annotation.Resource;
import com.xcong.excoin.modules.platform.entity.PlatformCnyUsdtExchangeEntity;
import com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xcong.excoin.common.LoginUserUtils;
import com.xcong.excoin.common.enumerates.MemberWalletCoinEnum;
@@ -41,6 +44,7 @@
import com.xcong.excoin.modules.member.entity.MemberSelectSymbolsEntity;
import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
import com.xcong.excoin.modules.platform.dao.PlatformCnyUsdtExchangeDao;
import com.xcong.excoin.modules.platform.dao.PlatformSymbolsCoinDao;
import com.xcong.excoin.modules.platform.dao.TradeSettingDao;
import com.xcong.excoin.modules.platform.entity.PlatformTradeSettingEntity;
import com.xcong.excoin.utils.CoinTypeConvert;
@@ -71,6 +75,8 @@
   MemberAccountFlowEntityDao memberAccountFlowEntityDao;
    @Resource
    RedisUtils redisUtils;
    @Resource
    PlatformSymbolsCoinDao platformSymbolsCoinDao;
   
   @Override
   public String generateSimpleSerialno(String userId) {
@@ -476,4 +482,35 @@
      return Result.ok(findCollectListVo);
   }
   @Override
   public Result searchSymbolResultList() {
      //获取用户ID
      Long memberId = LoginUserUtils.getAppLoginUser().getId();
      FindCollectListVo findCollectListVo = new FindCollectListVo();
      List<MemberSelectSymbolsVo> list = new ArrayList<>();
      Map<String, Object> columnMap = new HashMap<>();
      List<PlatformSymbolsCoinEntity> selectByMap = platformSymbolsCoinDao.selectByMap(columnMap);
      List<MemberSelectSymbolsEntity> selectSymbolByMemIdAndSymbol = memberSelectSymbolsDao.selectSymbolByMemId(memberId);
      for(PlatformSymbolsCoinEntity platformSymbolsCoinEntity : selectByMap) {
         MemberSelectSymbolsVo memberSelectSymbolsVo = new MemberSelectSymbolsVo();
         memberSelectSymbolsVo.setSymbol(platformSymbolsCoinEntity.getName());
         if(CollUtil.isNotEmpty(selectSymbolByMemIdAndSymbol)) {
            for(MemberSelectSymbolsEntity memberSelectSymbolsEntity : selectSymbolByMemIdAndSymbol) {
               if(platformSymbolsCoinEntity.getName().equals(memberSelectSymbolsEntity.getSymbol())) {
                  memberSelectSymbolsVo.setIsCollect(MemberSelectSymbolsVo.ISCOLLECT_YES);
               }else {
                  memberSelectSymbolsVo.setIsCollect(MemberSelectSymbolsVo.ISCOLLECT_NO);
               }
            }
         }else {
            memberSelectSymbolsVo.setIsCollect(MemberSelectSymbolsVo.ISCOLLECT_NO);
         }
         list.add(memberSelectSymbolsVo);
      }
      findCollectListVo.setMemberSelectSymbolsVo(list);
      return Result.ok(findCollectListVo);
   }
}