From f0e93eb5b38d5ce8abeb949a475d1112c2a1645f Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 06 Aug 2020 11:30:44 +0800
Subject: [PATCH] Merge branch 'follow' of https://gitee.com/chonggaoxiao/new_excoin into follow

---
 src/main/java/com/xcong/excoin/modules/documentary/vo/FollowFollowerNoticeVo.java           |   17 +++++++++++++++++
 src/main/java/com/xcong/excoin/modules/documentary/controller/DocumentaryController.java    |   11 +++++++++++
 src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java          |    2 ++
 src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java |   30 +++++++++++++++++++++++++++++-
 4 files changed, 59 insertions(+), 1 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 e08eefa..5958455 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
@@ -22,6 +22,7 @@
 import com.xcong.excoin.modules.documentary.service.DocumentaryService;
 import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderInfoVo;
 import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderSetInfoVo;
+import com.xcong.excoin.modules.documentary.vo.FollowFollowerNoticeVo;
 import com.xcong.excoin.modules.documentary.vo.FollowInfoVo;
 import com.xcong.excoin.modules.documentary.vo.FollowRecordsVo;
 import com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo;
@@ -59,6 +60,16 @@
 	}
 	
 	/**
+	 *  通知消息
+	 */
+	@ApiOperation(value="通知消息", notes="通知消息")
+	@ApiResponses({@ApiResponse( code = 200, message = "success", response = FollowFollowerNoticeVo.class)})
+	@PostMapping(value = "/getFollowFollowerNoticeList")
+	public Result  getFollowFollowerNoticeList() {
+		return documentaryService.getFollowFollowerNoticeList();
+	}
+	
+	/**
 	 *  交易员列表
 	 */
 	@ApiOperation(value="交易员列表", notes="交易员列表")
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 1692b89..10237e3 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
@@ -66,4 +66,6 @@
 
 	public Result getOutFollowInfo(@Valid OutFollowInfoDto outFollowInfoDto);
 
+	public Result getFollowFollowerNoticeList();
+
 }
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 3b1580c..48b666d 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
@@ -25,6 +25,7 @@
 import com.xcong.excoin.modules.contract.dao.ContractHoldOrderDao;
 import com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity;
 import com.xcong.excoin.modules.contract.entity.ContractOrderEntity;
+import com.xcong.excoin.modules.documentary.dao.FollowFollowerNoticeDao;
 import com.xcong.excoin.modules.documentary.dao.FollowFollowerOrderRelationDao;
 import com.xcong.excoin.modules.documentary.dao.FollowFollowerProfitDao;
 import com.xcong.excoin.modules.documentary.dao.FollowFollowerSettingDao;
@@ -42,6 +43,7 @@
 import com.xcong.excoin.modules.documentary.dto.TradeOrderInfoDto;
 import com.xcong.excoin.modules.documentary.dto.UpdateDocumentaryOrderSetDto;
 import com.xcong.excoin.modules.documentary.dto.UpdateTradeSetInfoDto;
+import com.xcong.excoin.modules.documentary.entity.FollowFollowerNoticeEntity;
 import com.xcong.excoin.modules.documentary.entity.FollowFollowerOrderRelationEntity;
 import com.xcong.excoin.modules.documentary.entity.FollowFollowerProfitEntity;
 import com.xcong.excoin.modules.documentary.entity.FollowFollowerSettingEntity;
@@ -50,6 +52,7 @@
 import com.xcong.excoin.modules.documentary.service.DocumentaryService;
 import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderInfoVo;
 import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderSetInfoVo;
+import com.xcong.excoin.modules.documentary.vo.FollowFollowerNoticeVo;
 import com.xcong.excoin.modules.documentary.vo.FollowInfoVo;
 import com.xcong.excoin.modules.documentary.vo.FollowRecordsVo;
 import com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo;
@@ -106,6 +109,8 @@
     private FollowFollowerSettingDao followFollowerSettingDao;
     @Resource
     private FollowFollowerOrderRelationDao followFollowerOrderRelationDao;
+    
+    private FollowFollowerNoticeDao followFollowerNoticeDao;
     
 	
 	@Override
@@ -931,7 +936,7 @@
         Long followMemberId = followFollowerProfitEntity.getMemberId();
         Long tradeId = followFollowerProfitEntity.getTradeId();
         columnMap.put("member_id", followMemberId);
-        columnMap.put("trade_id", tradeId);
+        columnMap.put("trader_id", tradeId);
         List<FollowFollowerSettingEntity> selectByMap = followFollowerSettingDao.selectByMap(columnMap);
         if(CollUtil.isNotEmpty(selectByMap)) {
         	for(FollowFollowerSettingEntity followFollowerSettingEntity : selectByMap) {
@@ -946,6 +951,29 @@
 		}
 		return Result.ok(MessageSourceUtils.getString("member_service_0026"));
 	}
+
+	@Override
+	public Result getFollowFollowerNoticeList() {
+		//获取用户ID
+        Long memberId = LoginUserUtils.getAppLoginUser().getId();
+        List<FollowFollowerNoticeVo> arrayList = new ArrayList<>();
+        
+        Map<String, Object> columnMap = new HashMap<>();
+        columnMap.put("member_id", memberId);
+		List<FollowFollowerNoticeEntity> selectByMap = followFollowerNoticeDao.selectByMap(columnMap );
+		if(CollUtil.isNotEmpty(selectByMap)) {
+			for(FollowFollowerNoticeEntity followFollowerNoticeEntity : selectByMap) {
+				FollowFollowerNoticeVo followFollowerNoticeVo = new FollowFollowerNoticeVo();
+				String title = followFollowerNoticeEntity.getTitle();
+				followFollowerNoticeVo.setTitle(title);
+				String content = followFollowerNoticeEntity.getContent();
+				followFollowerNoticeVo.setContent(content);
+				arrayList.add(followFollowerNoticeVo);
+			}
+		}
+        
+		return Result.ok(arrayList);
+	}
 	
 	
 	
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowFollowerNoticeVo.java b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowFollowerNoticeVo.java
new file mode 100644
index 0000000..e878081
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/documentary/vo/FollowFollowerNoticeVo.java
@@ -0,0 +1,17 @@
+package com.xcong.excoin.modules.documentary.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "FollowFollowerNoticeVo", description = "返回值")
+public class FollowFollowerNoticeVo {
+	
+    @ApiModelProperty("标题")
+    private String title;
+    
+    @ApiModelProperty("内容")
+    private String content;
+
+}

--
Gitblit v1.9.1