xiaoyong931011
2021-03-02 4d33da83dcc57e0347e503958d0ad30a59f42ac9
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -176,16 +176,15 @@
              
              String labels = followTraderInfoEntity.getLabels();
              if(StrUtil.isNotEmpty(labels)) {
                 String labelsName = "";
                 ArrayList<FollowTraderLabelEntity> arrayList = new ArrayList<>();
                 String[] split = labels.split(",");
                 int length = split.length;
                 for(int i = 0;i < length;i++) {
                    String string = split[i];
                    FollowTraderLabelEntity selectById = followTraderLabelDao.selectById(Long.parseLong(string));
                    String labelsNames = selectById.getLabels();
                    labelsName += (labelsNames + ",");
                    arrayList.add(selectById);
                 }
                 FollowTraderProfitInfoVo.setLabels(labelsName);
                 FollowTraderProfitInfoVo.setLabels(arrayList);
              }
              
           }
@@ -222,7 +221,8 @@
              historyOrderRecordsVo.setClosingPrice(closingPrice);
              BigDecimal openingPrice = historyOrderRecordsVo.getOpeningPrice().setScale(2, BigDecimal.ROUND_DOWN);
              historyOrderRecordsVo.setOpeningPrice(openingPrice);
           }
            historyOrderRecordsVo.setClosingTimeStamp(historyOrderRecordsVo.getClosingTime().getTime());
         }
        }
      return Result.ok(historyOrderRecordsVoList);
   }
@@ -309,38 +309,41 @@
                 MyFollowOrderVo myFollowOrderVo = new MyFollowOrderVo();
                 //获取交易员信息
               Long orderId = contractOrderEntity.getId();
               myFollowOrderVo.setOrderId(orderId);
               FollowFollowerOrderRelationEntity FollowFollowerOrderRelation = followFollowerOrderRelationDao.selectHistoryOneByorderId(orderId);
               Long tradeId = FollowFollowerOrderRelation.getTradeId();
               FollowTraderInfoEntity followTraderInfoEntity = followTraderInfoDao.selectById(tradeId);
               String nickname = followTraderInfoEntity.getNickname();
               myFollowOrderVo.setNickname(nickname);
                 String symbol = contractOrderEntity.getSymbol();
                 myFollowOrderVo.setSymbol(symbol);
                 int orderType = contractOrderEntity.getOrderType();
                 myFollowOrderVo.setOrderType(orderType);
                 int leverRatio = contractOrderEntity.getLeverRatio();
                 myFollowOrderVo.setLeverRatio(leverRatio);
                 BigDecimal rewardAmount = contractOrderEntity.getRewardAmount().setScale(2, BigDecimal.ROUND_DOWN);
                 myFollowOrderVo.setRewardAmount(rewardAmount);
                 BigDecimal rewardRatio = contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
                 myFollowOrderVo.setRewardRatio(rewardRatio);
                 int symbolCnt = contractOrderEntity.getSymbolCnt();
                 myFollowOrderVo.setSymbolCnt(symbolCnt);
                 BigDecimal bondAmount = contractOrderEntity.getBondAmount().setScale(2, BigDecimal.ROUND_DOWN);
                 myFollowOrderVo.setBondAmount(bondAmount);
                 BigDecimal openingPrice = contractOrderEntity.getOpeningPrice().setScale(2, BigDecimal.ROUND_DOWN);
                 myFollowOrderVo.setOpeningPrice(openingPrice);
                 BigDecimal closingPrice = contractOrderEntity.getClosingPrice().setScale(2, BigDecimal.ROUND_DOWN);
                 myFollowOrderVo.setClosingPrice(closingPrice);
                 Date openingTime = contractOrderEntity.getOpeningTime();
                 myFollowOrderVo.setOpeningTime(openingTime);
                 Date closingTime = contractOrderEntity.getClosingTime();
                 myFollowOrderVo.setClosingTime(closingTime);
                 String orderNo = contractOrderEntity.getOrderNo();
                 myFollowOrderVo.setOrderNo(orderNo);
                 myFollowOrderVos.add(myFollowOrderVo);
               if(ObjectUtil.isNotEmpty(FollowFollowerOrderRelation)) {
                  myFollowOrderVo.setOrderId(orderId);
                  Long tradeId = FollowFollowerOrderRelation.getTradeId();
                  FollowTraderInfoEntity followTraderInfoEntity = followTraderInfoDao.selectById(tradeId);
                  if(ObjectUtil.isNotEmpty(followTraderInfoEntity)) {
                     String nickname = followTraderInfoEntity.getNickname();
                     myFollowOrderVo.setNickname(nickname);
                  }
                  String symbol = contractOrderEntity.getSymbol();
                  myFollowOrderVo.setSymbol(symbol);
                  int orderType = contractOrderEntity.getOrderType();
                  myFollowOrderVo.setOrderType(orderType);
                  int leverRatio = contractOrderEntity.getLeverRatio();
                  myFollowOrderVo.setLeverRatio(leverRatio);
                  BigDecimal rewardAmount = contractOrderEntity.getRewardAmount().setScale(2, BigDecimal.ROUND_DOWN);
                  myFollowOrderVo.setRewardAmount(rewardAmount);
                  BigDecimal rewardRatio = contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
                  myFollowOrderVo.setRewardRatio(rewardRatio);
                  int symbolCnt = contractOrderEntity.getSymbolCnt();
                  myFollowOrderVo.setSymbolCnt(symbolCnt);
                  BigDecimal bondAmount = contractOrderEntity.getBondAmount().setScale(2, BigDecimal.ROUND_DOWN);
                  myFollowOrderVo.setBondAmount(bondAmount);
                  BigDecimal openingPrice = contractOrderEntity.getOpeningPrice().setScale(2, BigDecimal.ROUND_DOWN);
                  myFollowOrderVo.setOpeningPrice(openingPrice);
                  BigDecimal closingPrice = contractOrderEntity.getClosingPrice().setScale(2, BigDecimal.ROUND_DOWN);
                  myFollowOrderVo.setClosingPrice(closingPrice);
                  Date openingTime = contractOrderEntity.getOpeningTime();
                  myFollowOrderVo.setOpeningTime(openingTime);
                  Date closingTime = contractOrderEntity.getClosingTime();
                  myFollowOrderVo.setClosingTime(closingTime);
                  String orderNo = contractOrderEntity.getOrderNo();
                  myFollowOrderVo.setOrderNo(orderNo);
                  myFollowOrderVos.add(myFollowOrderVo);
               }
              }
           }
      return Result.ok(myFollowOrderVos);
@@ -727,9 +730,9 @@
        String phone = memberEntity.getPhone();
        String email = memberEntity.getEmail();
        if(StrUtil.isNotEmpty(phone)) {
           followTraderInfoEntity.setNickname(phone);
           followTraderInfoEntity.setNickname(phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
        }else {
           followTraderInfoEntity.setNickname(email);
           followTraderInfoEntity.setNickname(email.replaceAll("(\\w?)(\\w+)(\\w)(@\\w+\\.[a-z]+(\\.[a-z]+)?)","$1****$3$4"));
        }
        followTraderInfoEntity.setDeclaration(FollowTraderInfoEntity.DECLARATION_DEFAULT);
        followTraderInfoEntity.setIsAll(FollowTraderInfoEntity.IS_ALL_N);