xiaoyong931011
2021-03-02 4d33da83dcc57e0347e503958d0ad30a59f42ac9
20210302 我的跟单--我的跟单--历史跟单
1 files modified
65 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java 65 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -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);