From 16f6d4eedb8e2174f0959d7735a24d6c53d7b6e8 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 04 Mar 2021 12:02:27 +0800
Subject: [PATCH] 20210304 消息提醒
---
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
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 c26d763..ba8d937 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
@@ -11,6 +11,8 @@
import javax.validation.Valid;
import com.xcong.excoin.modules.documentary.common.NoticeConstant;
+import com.xcong.excoin.modules.member.entity.MemberSettingEntity;
+import com.xcong.excoin.modules.member.parameter.vo.MemberMessageReminderVo;
import com.xcong.excoin.utils.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -58,6 +60,7 @@
import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
import com.xcong.excoin.modules.documentary.service.DocumentaryService;
+import com.xcong.excoin.modules.documentary.vo.BeTraderConditionVo;
import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderInfoVo;
import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderSetInfoVo;
import com.xcong.excoin.modules.documentary.vo.FollowFollowerNoticeVo;
@@ -77,6 +80,7 @@
import com.xcong.excoin.modules.documentary.vo.TraderStatusVo;
import com.xcong.excoin.modules.member.dao.MemberDao;
import com.xcong.excoin.modules.member.dao.MemberLevelRateDao;
+import com.xcong.excoin.modules.member.dao.MemberSettingDao;
import com.xcong.excoin.modules.member.dao.MemberWalletContractDao;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberLevelRateEntity;
@@ -125,6 +129,8 @@
private FollowFollowerNoticeDao followFollowerNoticeDao;
@Resource
private FollowTraderLabelDao followTraderLabelDao;
+ @Resource
+ private MemberSettingDao memberSettingDao;
@Override
@@ -1064,6 +1070,18 @@
long id = outFollowInfoDto.getId();
//获取【跟随者收益】
FollowFollowerProfitEntity followFollowerProfitEntity = followFollowerProfitDao.selectById(id);
+
+ //当前有跟单合约不允许移除
+ //获取【跟随者-订单关联表】
+ Map<String, Object> selectColumnMap = new HashMap<>();
+ selectColumnMap.put("member_id", followFollowerProfitEntity.getMemberId());
+ selectColumnMap.put("trade_member_id", memberId);
+ selectColumnMap.put("order_type", FollowFollowerOrderRelationEntity.ORDER_TYPE_HOLD);
+ List<FollowFollowerOrderRelationEntity> followFollowerOrderRelationEntitys = followFollowerOrderRelationDao.selectByMap(selectColumnMap);
+ if(CollUtil.isNotEmpty(followFollowerOrderRelationEntitys)) {
+ return Result.fail(MessageSourceUtils.getString("documentary_service_0019"));
+ }
+
followFollowerProfitEntity.setIsFollow(FollowFollowerProfitEntity.IS_FOLLOW_N);
followFollowerProfitDao.updateById(followFollowerProfitEntity);
@@ -1089,6 +1107,7 @@
}
@Override
+ @Transactional
public Result getFollowFollowerNoticeList(FollowFollowerNoticeDto followFollowerNoticeDto) {
//获取用户ID
Long memberId = LoginUserUtils.getAppLoginUser().getId();
@@ -1110,6 +1129,12 @@
followFollowerNoticeVo.setCreateTime(createTime);
arrayList.add(followFollowerNoticeVo);
}
+ }
+ MemberSettingEntity memberSettingEntity = memberSettingDao.selectMemberSettingByMemberId(memberId);
+ if(ObjectUtil.isNotEmpty(memberSettingEntity)) {
+ log.info(memberId + "的消息提醒状态变更");
+ memberSettingEntity.setMessageReminder(0);
+ memberSettingDao.updateById(memberSettingEntity);
}
return Result.ok(arrayList);
@@ -1135,6 +1160,13 @@
}
return Result.ok(arrayList);
}
+
+ @Override
+ public Result beTraderCondition() {
+ String type = "apply_trader_rule";
+ List<BeTraderConditionVo> beTraderConditionVos = followTraderInfoDao.selectBeTraderCondition(type);
+ return Result.ok(beTraderConditionVos);
+ }
--
Gitblit v1.9.1