From 723e2757e0efa3c00354ed5f24c8e03cba4b676b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 05 Aug 2020 15:19:36 +0800
Subject: [PATCH] 20200805 代码提交
---
src/main/java/com/xcong/excoin/modules/documentary/dto/OutFollowInfoDto.java | 17 +++++++++++++++++
src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java | 12 ++++++++++++
src/main/java/com/xcong/excoin/modules/documentary/service/DocumentaryService.java | 3 +++
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java | 15 +++++++++++++++
4 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java b/src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java
index cd02124..abc0f98 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/controller/TraderController.java
@@ -10,6 +10,7 @@
import org.springframework.web.bind.annotation.RestController;
import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.documentary.dto.OutFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeOrderInfoDto;
import com.xcong.excoin.modules.documentary.dto.UpdateTradeSetInfoDto;
@@ -22,6 +23,8 @@
import com.xcong.excoin.modules.documentary.vo.TraderStatusVo;
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;
@@ -87,6 +90,15 @@
}
/**
+ * 交易员设置--踢出跟随者
+ */
+ @ApiOperation(value="交易员设置--踢出跟随者", notes="交易员设置--踢出跟随者")
+ @PostMapping(value = "/getOutFollowInfo")
+ public Result getOutFollowInfo(@RequestBody @Valid OutFollowInfoDto outFollowInfoDto) {
+ return documentaryService.getOutFollowInfo(outFollowInfoDto);
+ }
+
+ /**
* 成为交易员---立即入驻
*/
@ApiOperation(value="成为交易员---立即入驻", notes="成为交易员---立即入驻")
diff --git a/src/main/java/com/xcong/excoin/modules/documentary/dto/OutFollowInfoDto.java b/src/main/java/com/xcong/excoin/modules/documentary/dto/OutFollowInfoDto.java
new file mode 100644
index 0000000..a50fd38
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/documentary/dto/OutFollowInfoDto.java
@@ -0,0 +1,17 @@
+package com.xcong.excoin.modules.documentary.dto;
+
+import javax.validation.constraints.NotNull;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value = "OutFollowInfoDto", description = "参数接受类")
+public class OutFollowInfoDto {
+
+ @NotNull
+ @ApiModelProperty(value = "ID", example = "1")
+ private long id;
+
+}
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 08f9820..1692b89 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
@@ -11,6 +11,7 @@
import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
import com.xcong.excoin.modules.documentary.dto.MyFollowOrderDto;
import com.xcong.excoin.modules.documentary.dto.MyFollowTraderInfoDto;
+import com.xcong.excoin.modules.documentary.dto.OutFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeOrderInfoDto;
import com.xcong.excoin.modules.documentary.dto.UpdateDocumentaryOrderSetDto;
@@ -63,4 +64,6 @@
public Result getTradeFollowInfo(@Valid TradeFollowInfoDto tradeFollowInfoDto);
+ public Result getOutFollowInfo(@Valid OutFollowInfoDto outFollowInfoDto);
+
}
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 afd020e..efd2fb6 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
@@ -35,6 +35,7 @@
import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
import com.xcong.excoin.modules.documentary.dto.MyFollowOrderDto;
import com.xcong.excoin.modules.documentary.dto.MyFollowTraderInfoDto;
+import com.xcong.excoin.modules.documentary.dto.OutFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeFollowInfoDto;
import com.xcong.excoin.modules.documentary.dto.TradeOrderInfoDto;
import com.xcong.excoin.modules.documentary.dto.UpdateDocumentaryOrderSetDto;
@@ -892,6 +893,20 @@
}
return Result.ok(myFollowOrderVos);
}
+
+ @Override
+ @Transactional
+ public Result getOutFollowInfo(@Valid OutFollowInfoDto outFollowInfoDto) {
+ //获取用户ID
+ Long memberId = LoginUserUtils.getAppLoginUser().getId();
+ long id = outFollowInfoDto.getId();
+ //获取【跟随者收益】
+ FollowFollowerProfitEntity followFollowerProfitEntity = followFollowerProfitDao.selectById(id);
+ followFollowerProfitEntity.setIsFollow(FollowFollowerProfitEntity.IS_FOLLOW_N);
+ followFollowerProfitDao.updateById(followFollowerProfitEntity);
+
+ return Result.ok(MessageSourceUtils.getString("member_service_0026"));
+ }
--
Gitblit v1.9.1