From 07f76d11dc6304a362cdc5ff907047a6e9e45185 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 29 Jul 2020 16:27:00 +0800
Subject: [PATCH] 20200729  代码提交

---
 src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerNoticeDao.java         |    5 
 src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml                         |   22 +++
 src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java          |    5 
 src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerProfitDao.java         |   13 ++
 src/main/java/com/xcong/excoin/modules/documentary/vo/FollowRecordsVo.java                  |   56 +++++++++
 src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerOrderRelationDao.java  |    5 
 src/main/java/com/xcong/excoin/modules/documentary/dto/FollowRecordsDto.java                |   27 ++++
 /dev/null                                                                                   |   17 --
 src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java       |    4 
 src/main/resources/mapper/documentary/FollowTraderProfitDetailDao.xml                       |    6 +
 src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml                           |   16 ++
 src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerSettingDao.java        |    5 
 src/main/java/com/xcong/excoin/modules/documentary/vo/HistoryOrderRecordsVo.java            |   45 +++++++
 src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java    |   25 ++-
 src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java |   66 +++++++++--
 src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoVo.java         |   14 ++
 16 files changed, 288 insertions(+), 43 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java b/src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java
index 7d39668..24941bb 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java
@@ -1,11 +1,9 @@
 package com.xcong.excoin.modules.documentary.controller;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
 
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -13,14 +11,13 @@
 import com.xcong.excoin.common.response.Result;
 import com.xcong.excoin.modules.coin.parameter.dto.RecordsPageDto;
 import com.xcong.excoin.modules.coin.parameter.vo.MemberAgentIntoInfoVo;
+import com.xcong.excoin.modules.documentary.dto.FollowRecordsDto;
 import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
 import com.xcong.excoin.modules.documentary.service.DocumentaryService;
+import com.xcong.excoin.modules.documentary.vo.FollowRecordsVo;
 import com.xcong.excoin.modules.documentary.vo.MemberIsTradeVo;
-import com.xcong.excoin.modules.member.parameter.vo.AppVersionListVo;
 
 import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
 import io.swagger.annotations.ApiResponses;
@@ -32,7 +29,7 @@
 @Api(value = "MemberQuickBuySaleController", tags = "跟单")
 public class DocumentaryController {
 	
-	@Autowired
+	@Resource
 	DocumentaryService documentaryService;
 	
 	/**
@@ -63,9 +60,21 @@
 	@ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberAgentIntoInfoVo.class)})
 	@GetMapping(value = "/getHistoryOrderRecords")
 	public Result  getHistoryOrderRecords(@RequestBody @Valid HistoryOrderRecordsDto historyOrderRecordsDto) {
-		return documentaryService.getWalletAgentIntoRecords(historyOrderRecordsDto);
+		return documentaryService.getHistoryOrderRecords(historyOrderRecordsDto);
 	}
 	
+	/**
+	 *  跟随者
+	 * @return
+	 */
+	@ApiOperation(value="getFollowRecords", notes="跟随者")
+	@ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowRecordsVo.class)})
+	@GetMapping(value = "/getFollowRecords")
+	public Result  getFollowRecords(@RequestBody @Valid FollowRecordsDto followRecordsDto) {
+		return documentaryService.getFollowRecords(followRecordsDto);
+	}
+	
+	
 	
 	
 	
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerNoticeDao.java b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerNoticeDao.java
index 74d554f..84d87b7 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerNoticeDao.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerNoticeDao.java
@@ -1,7 +1,10 @@
 package com.xcong.excoin.modules.documentary.dao;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.documentary.entity.FollowFollowerNoticeEntity;
+
 /**
  * @author helius
  */
-public interface FollowFollowerNoticeDao {
+public interface FollowFollowerNoticeDao extends BaseMapper<FollowFollowerNoticeEntity> {
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerOrderRelationDao.java b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerOrderRelationDao.java
index 3f2cf8f..dff3af5 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerOrderRelationDao.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerOrderRelationDao.java
@@ -1,7 +1,10 @@
 package com.xcong.excoin.modules.documentary.dao;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.documentary.entity.FollowFollowerOrderRelationEntity;
+
 /**
  * @author helius
  */
-public interface FollowFollowerOrderRelationDao {
+public interface FollowFollowerOrderRelationDao extends BaseMapper<FollowFollowerOrderRelationEntity> {
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerProfitDao.java b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerProfitDao.java
index 7f1b041..0e2e758 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerProfitDao.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerProfitDao.java
@@ -1,7 +1,18 @@
 package com.xcong.excoin.modules.documentary.dao;
 
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xcong.excoin.modules.documentary.entity.FollowFollowerProfitEntity;
+import com.xcong.excoin.modules.documentary.vo.FollowRecordsVo;
+
 /**
  * @author helius
  */
-public interface FollowFollowerProfitDao {
+public interface FollowFollowerProfitDao extends BaseMapper<FollowFollowerProfitEntity> {
+
+	IPage<FollowRecordsVo> selectFollowRecords(Page<FollowRecordsVo> page, @Param("tradeMemberId")Long tradeMemberId);
+	
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerSettingDao.java b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerSettingDao.java
index b408308..9c14875 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerSettingDao.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowFollowerSettingDao.java
@@ -1,7 +1,10 @@
 package com.xcong.excoin.modules.documentary.dao;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.documentary.entity.FollowFollowerSettingEntity;
+
 /**
  * @author helius
  */
-public interface FollowFollowerSettingDao {
+public interface FollowFollowerSettingDao extends BaseMapper<FollowFollowerSettingEntity> {
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java
index 814aff9..c9b52e4 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dao/FollowTraderProfitInfoDao.java
@@ -7,10 +7,14 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
 import com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo;
+import com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo;
 
 public interface FollowTraderProfitInfoDao extends BaseMapper<FollowTraderProfitInfoEntity> {
 	
 	IPage<FollowTraderProfitInfoVo> selectFollowTraderProfitInfoEntity(Page<FollowTraderProfitInfoVo> page,
 			@Param("record")FollowTraderProfitInfoEntity memberAccountMoneyChange);
 
+	IPage<HistoryOrderRecordsVo> selectHistoryOrderRecords(Page<HistoryOrderRecordsVo> page, 
+			@Param("memberId")Long memberId);
+
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dto/FollowRecordsDto.java b/src/main/java/com/xcong/excoin/modules/documentary/dto/FollowRecordsDto.java
new file mode 100644
index 0000000..fed391b
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dto/FollowRecordsDto.java
@@ -0,0 +1,27 @@
+package com.xcong.excoin.modules.documentary.dto;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "FollowRecordsDto", description = "跟随者参数接受类")
+public class FollowRecordsDto {
+	
+	@NotNull
+    @Min(1)
+    @ApiModelProperty(value = "第几页", example = "1")
+    private int pageNum;
+
+    @NotNull
+    @ApiModelProperty(value = "每页数量", example = "10")
+    private int pageSize;
+    
+    @NotNull
+    @ApiModelProperty(value = "会员ID", example = "12543")
+    private Long tradeMemberId;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java b/src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java
index 5f4b1e4..f58bdc7 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java
@@ -5,6 +5,7 @@
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.xcong.excoin.common.response.Result;
 import com.xcong.excoin.modules.coin.parameter.dto.RecordsPageDto;
+import com.xcong.excoin.modules.documentary.dto.FollowRecordsDto;
 import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
 import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
 
@@ -14,6 +15,8 @@
 
 	public Result getFollowTraderProfitInfo(@Valid RecordsPageDto recordsPageDto);
 
-	public Result getWalletAgentIntoRecords(@Valid HistoryOrderRecordsDto historyOrderRecordsDto);
+	public Result getHistoryOrderRecords(@Valid HistoryOrderRecordsDto historyOrderRecordsDto);
+
+	public Result getFollowRecords(@Valid FollowRecordsDto followRecordsDto);
 
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
index c3b5bc5..f2c4ef9 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -7,24 +7,25 @@
 
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 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.response.Result;
-import com.xcong.excoin.modules.coin.entity.MemberAccountMoneyChange;
-import com.xcong.excoin.modules.coin.entity.OrderCoinsDealEntity;
+import com.xcong.excoin.modules.coin.dao.OrderCoinsDao;
 import com.xcong.excoin.modules.coin.parameter.dto.RecordsPageDto;
+import com.xcong.excoin.modules.documentary.dao.FollowFollowerProfitDao;
 import com.xcong.excoin.modules.documentary.dao.FollowTraderInfoDao;
 import com.xcong.excoin.modules.documentary.dao.FollowTraderProfitDetailDao;
 import com.xcong.excoin.modules.documentary.dao.FollowTraderProfitInfoDao;
+import com.xcong.excoin.modules.documentary.dto.FollowRecordsDto;
 import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
 import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
 import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
 import com.xcong.excoin.modules.documentary.service.DocumentaryService;
+import com.xcong.excoin.modules.documentary.vo.FollowRecordsVo;
 import com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo;
+import com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo;
 import com.xcong.excoin.modules.documentary.vo.MemberIsTradeVo;
 import com.xcong.excoin.modules.member.dao.MemberDao;
 import com.xcong.excoin.modules.member.entity.MemberEntity;
@@ -44,6 +45,10 @@
 	private FollowTraderProfitDetailDao followTraderProfitDetailDao;
 	@Resource
 	private FollowTraderProfitInfoDao followTraderProfitInfoDao;
+	@Resource
+	private FollowFollowerProfitDao followFollowerProfitDao;
+	@Resource
+	private OrderCoinsDao orderCoinsDao;
 	
 	@Override
 	public Result getMemberIsTradeInfo() {
@@ -66,11 +71,11 @@
         
         Page<FollowTraderProfitInfoVo> page = new Page<>(recordsPageDto.getPageNum(), recordsPageDto.getPageSize());
         FollowTraderProfitInfoEntity memberAccountMoneyChange = new FollowTraderProfitInfoEntity();
-        IPage<FollowTraderProfitInfoVo> FollowTraderProfitInfoList = followTraderProfitInfoDao.selectFollowTraderProfitInfoEntity(page, memberAccountMoneyChange);
+        IPage<FollowTraderProfitInfoVo> followTraderProfitInfoList = followTraderProfitInfoDao.selectFollowTraderProfitInfoEntity(page, memberAccountMoneyChange);
         
-        List<FollowTraderProfitInfoVo> FollowTraderProfitInfoVoList = FollowTraderProfitInfoList.getRecords();
-        if(CollUtil.isNotEmpty(FollowTraderProfitInfoVoList)) {
-        	for(FollowTraderProfitInfoVo FollowTraderProfitInfoVo : FollowTraderProfitInfoVoList) {
+        List<FollowTraderProfitInfoVo> followTraderProfitInfoVoList = followTraderProfitInfoList.getRecords();
+        if(CollUtil.isNotEmpty(followTraderProfitInfoVoList)) {
+        	for(FollowTraderProfitInfoVo FollowTraderProfitInfoVo : followTraderProfitInfoVoList) {
         		Long traderId = FollowTraderProfitInfoVo.getTraderId();
         		FollowTraderInfoEntity followTraderInfoEntity = followTraderInfoDao.selectFollowTraderInfoEntityBytreaderId(traderId);
         		String avatar = followTraderInfoEntity.getAvatar();
@@ -85,13 +90,50 @@
         		FollowTraderProfitInfoVo.setIsOpen(isOpen);
         	}
         }
-		return Result.ok(FollowTraderProfitInfoVoList);
+		return Result.ok(followTraderProfitInfoVoList);
 	}
 
 	@Override
-	public Result getWalletAgentIntoRecords(@Valid HistoryOrderRecordsDto historyOrderRecordsDto) {
-		// TODO Auto-generated method stub
-		return null;
+	public Result getHistoryOrderRecords(@Valid HistoryOrderRecordsDto historyOrderRecordsDto) {
+		
+		Page<HistoryOrderRecordsVo> page = new Page<>(historyOrderRecordsDto.getPageNum(), historyOrderRecordsDto.getPageSize());
+        IPage<HistoryOrderRecordsVo> historyOrderRecordsVoList = followTraderProfitInfoDao.selectHistoryOrderRecords(page, historyOrderRecordsDto.getMemberId());
+		return Result.ok(historyOrderRecordsVoList);
 	}
 
+	@Override
+	public Result getFollowRecords(@Valid FollowRecordsDto followRecordsDto) {
+		
+		Page<FollowRecordsVo> page = new Page<>(followRecordsDto.getPageNum(), followRecordsDto.getPageSize());
+		IPage<FollowRecordsVo> historyOrderRecordsVoList = followFollowerProfitDao.selectFollowRecords(page, followRecordsDto.getTradeMemberId());
+		return Result.ok(historyOrderRecordsVoList);
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowRecordsVo.java b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowRecordsVo.java
new file mode 100644
index 0000000..de61253
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowRecordsVo.java
@@ -0,0 +1,56 @@
+package com.xcong.excoin.modules.documentary.vo;
+
+import java.math.BigDecimal;
+
+import com.xcong.excoin.common.system.base.BaseEntity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "FollowRecordsVo", description = "跟随者列表")
+public class FollowRecordsVo extends BaseEntity{
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	public static final Integer IS_FOLLOW_Y = 1;
+    public static final Integer IS_FOLLOW_N = 2;
+
+    /**
+     * 主键ID
+     */
+    @ApiModelProperty(value = "主键ID")
+    private Long id;
+    /**
+     * 跟随者ID
+     */
+    @ApiModelProperty(value = "跟随者ID")
+    private Long memberId;
+    /**
+     * 交易员ID
+     */
+    @ApiModelProperty(value = "交易员ID")
+    private Long tradeId;
+    /**
+     * 交易员会员ID
+     */
+    @ApiModelProperty(value = "交易员会员ID")
+    private Long tradeMemberId;
+    /**
+     * 累计跟随本金
+     */
+    @ApiModelProperty(value = "累计跟随本金")
+    private BigDecimal totalPrincipal;
+    /**
+     * 累计收益
+     */
+    @ApiModelProperty(value = "累计收益")
+    private BigDecimal totalProfit;
+    /**
+     * 是否跟随 1-是 2-否
+     */
+    @ApiModelProperty(value = "是否跟随 1-是 2-否")
+    private Integer isFollow;
+}
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoListVo.java b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoListVo.java
deleted file mode 100644
index d93cfa4..0000000
--- a/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoListVo.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.xcong.excoin.modules.documentary.vo;
-
-import java.util.List;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@Data
-@ApiModel(value = "FollowTraderProfitInfoListVo", description = "交易员列表")
-public class FollowTraderProfitInfoListVo {
-	
-	@ApiModelProperty(value = "交易员信息")
-	private List<FollowTraderProfitInfoVo> followTraderProfitInfoVo;
-
-
-}
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoVo.java b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoVo.java
index 44116be..dbb381c 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoVo.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowTraderProfitInfoVo.java
@@ -5,6 +5,7 @@
 import com.xcong.excoin.common.system.base.BaseEntity;
 
 import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 @Data
@@ -18,55 +19,68 @@
 	/**
      * 交易员ID
      */
+	@ApiModelProperty("交易员ID")
     private Long traderId;
     /**
      * 会员ID
      */
+	@ApiModelProperty("会员ID")
     private Long memberId;
     /**
      * 累计收益率
      */
+	@ApiModelProperty("累计收益率")
     private BigDecimal totalProfitRatio;
     /**
      * 带单总收益
      */
+	@ApiModelProperty("带单总收益")
     private BigDecimal totalProfit;
     /**
      * 跟随者总收益
      */
+	@ApiModelProperty("跟随者总收益")
     private BigDecimal followerTotalProfit;
     /**
      * 胜率
      */
+	@ApiModelProperty("胜率")
     private BigDecimal winRate;
     /**
      * 累计跟随人数
      */
+	@ApiModelProperty("累计跟随人数")
     private BigDecimal totalFollowerCnt;
     /**
      * 交易笔数
      */
+	@ApiModelProperty("交易笔数")
     private BigDecimal totalOrderCnt;
     
     /**
      * 头像
      */
+	@ApiModelProperty("头像")
     private String avatar;
     /**
      * 名称
      */
+	@ApiModelProperty("名称")
     private String nickname;
     /**
      * 宣言
      */
+	@ApiModelProperty("宣言")
     private String declaration;
     /**
      * 是否满员 1-是2-否
      */
+	@ApiModelProperty("是否满员 1-是2-否")
     private Integer isAll;
     /**
      * 是否开启带单 1是2否
      */
+	@ApiModelProperty("是否开启带单 1是2否")
     private Integer isOpen;
 
 }
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/vo/HistoryOrderRecordsVo.java b/src/main/java/com/xcong/excoin/modules/documentary/vo/HistoryOrderRecordsVo.java
new file mode 100644
index 0000000..8836574
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/documentary/vo/HistoryOrderRecordsVo.java
@@ -0,0 +1,45 @@
+package com.xcong.excoin.modules.documentary.vo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "HistoryOrderRecordsVo", description = "历史带单")
+public class HistoryOrderRecordsVo {
+	
+	@ApiModelProperty("币种")
+	private String symbol;
+	
+	@ApiModelProperty("订单类型 -1撤单,1开多,2开空,3平多,4平空")
+	private int orderType;
+
+	@ApiModelProperty("杠杆")
+	private int leverRatio;
+	
+	@ApiModelProperty("开仓价")
+    private BigDecimal openingPrice;
+	
+	@ApiModelProperty("平仓价")
+	private BigDecimal closingPrice;
+	
+	@ApiModelProperty("盈亏比例")
+    private BigDecimal rewardRatio;
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty("开仓时间")
+    private Date openingTime;
+	
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty("平仓时间")
+    private Date closingTime;
+	
+	@ApiModelProperty("订单编号")
+	private String orderNo;
+
+}
diff --git a/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml b/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
index 33022cd..cc8e13f 100644
--- a/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
+++ b/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
@@ -2,4 +2,20 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xcong.excoin.modules.documentary.dao.FollowFollowerProfitDao">
 
+	<select id="selectFollowRecords" resultType="com.xcong.excoin.modules.documentary.vo.FollowRecordsVo">
+		SELECT
+			id,
+			member_id memberId,
+			trade_id tradeId,
+			trade_member_id tradeMemberId,
+			total_principal totalPrincipal,
+			is_follow isFollow,
+			total_profit totalProfit
+		FROM
+			follow_follower_profit 
+		WHERE 
+			trade_member_id = #{tradeMemberId} 
+		order by create_time desc
+    </select>
+
 </mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/documentary/FollowTraderProfitDetailDao.xml b/src/main/resources/mapper/documentary/FollowTraderProfitDetailDao.xml
new file mode 100644
index 0000000..a6e586a
--- /dev/null
+++ b/src/main/resources/mapper/documentary/FollowTraderProfitDetailDao.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xcong.excoin.modules.documentary.dao.FollowTraderProfitDetailDao">
+	
+    
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml b/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
index 449a3c1..646912f 100644
--- a/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
+++ b/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
@@ -4,8 +4,28 @@
 	
 	<select id="selectFollowTraderProfitInfoEntity" resultType="com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity">
 		select * from follow_trader_profit_info 
-		
         order by id desc
     </select>
     
+	<select id="selectHistoryOrderRecords" resultType="com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo">
+		SELECT
+			symbol,
+			order_type orderType,
+			lever_ratio leverRatio,
+			opening_price openingPrice,
+			closing_price closingPrice,
+			reward_ratio rewardRatio,
+			opening_time openingTime,
+			closing_time closingTime,
+			order_no orderNo
+		FROM
+			contract_order 
+		WHERE 
+			member_id = #{memberId} 
+			and contract_type = 2
+			and order_type in (3,4)
+			and closing_type not in (4,5)
+		order by opening_time desc
+    </select>
+    
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1