| | |
| | | import com.xcong.excoin.modules.documentary.dao.FollowTraderProfitInfoDao;
|
| | | import com.xcong.excoin.modules.documentary.dto.CancelDocumentaryOrderSetDto;
|
| | | import com.xcong.excoin.modules.documentary.dto.DocumentaryOrderSetDto;
|
| | | import com.xcong.excoin.modules.documentary.dto.FollowFollowerNoticeDto;
|
| | | import com.xcong.excoin.modules.documentary.dto.FollowRecordsDto;
|
| | | import com.xcong.excoin.modules.documentary.dto.HistoryOrderRecordsDto;
|
| | | import com.xcong.excoin.modules.documentary.dto.MyFollowOrderDto;
|
| | |
| | |
|
| | | FollowTraderInfoEntity traderInfoEntity = followTraderInfoDao.selectTraderInfoByMemberId(memberId);
|
| | | if (traderInfoEntity != null) {
|
| | | return Result.fail("交易员不能进行跟单");
|
| | | return Result.fail(MessageSourceUtils.getString("documentary_service_0014"));
|
| | | }
|
| | |
|
| | | FollowFollowerSettingEntity isExistSetting = followFollowerSettingDao.selectOneBymemberIdAndTradeId(memberId, traderId);
|
| | |
| | | List<FollowFollowerProfitEntity> followFollowerProfitEntitys = followFollowerProfitDao.selectByMap(columnMaps);
|
| | | if(CollUtil.isNotEmpty(followFollowerProfitEntitys)) {
|
| | | return Result.fail(MessageSourceUtils.getString("documentary_service_0015"));
|
| | | }
|
| | | |
| | | //合约不能持仓
|
| | | Map<String, Object> contractHoldColumnMap = new HashMap<>();
|
| | | contractHoldColumnMap.put("member_id", memberId);
|
| | | List<ContractHoldOrderEntity> contractHoldOrderEntitys = contractHoldOrderDao.selectByMap(contractHoldColumnMap);
|
| | | if(CollUtil.isNotEmpty(contractHoldOrderEntitys)) {
|
| | | return Result.fail(MessageSourceUtils.getString("documentary_service_0013"));
|
| | | }
|
| | |
|
| | | Map<String, Object> columnMap = new HashMap<>();
|
| | |
| | | BigDecimal allRewardRatio = BigDecimal.ZERO;
|
| | |
|
| | | Long orderId = contractOrderEntity.getId();
|
| | | String orderNo = contractOrderEntity.getOrderNo();
|
| | | Map<String, Object> columnMapRelation = new HashMap<>();
|
| | | columnMapRelation.put("trade_order_no", orderId);
|
| | | columnMapRelation.put("trade_order_no", orderNo);
|
| | | columnMapRelation.put("trade_member_id", memberId);
|
| | | columnMapRelation.put("order_type", 2);
|
| | | columnMapRelation.put("is_show", 1);
|
| | |
| | | myFollowOrderVo.setOpeningTime(openingTime);
|
| | | Date closingTime = contractOrderEntity.getClosingTime();
|
| | | myFollowOrderVo.setClosingTime(closingTime);
|
| | | String orderNo = contractOrderEntity.getOrderNo();
|
| | | |
| | | myFollowOrderVo.setOrderNo(orderNo);
|
| | | myFollowOrderVos.add(myFollowOrderVo);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public Result getFollowFollowerNoticeList() {
|
| | | public Result getFollowFollowerNoticeList(FollowFollowerNoticeDto followFollowerNoticeDto) {
|
| | | //获取用户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) {
|
| | | Page<FollowFollowerNoticeEntity> page = new Page<>(followFollowerNoticeDto.getPageNum(), followFollowerNoticeDto.getPageSize());
|
| | | FollowFollowerNoticeEntity followFollowerNoticeEntity = new FollowFollowerNoticeEntity();
|
| | | followFollowerNoticeEntity.setMemberId(memberId);
|
| | | IPage<FollowFollowerNoticeEntity> followFollowerNoticelist = followFollowerNoticeDao.selectFollowFollowerNoticePage(page, followFollowerNoticeEntity);
|
| | | List<FollowFollowerNoticeEntity> records = followFollowerNoticelist.getRecords();
|
| | | if(CollUtil.isNotEmpty(records)) {
|
| | | for(FollowFollowerNoticeEntity followFollowerNotice : records) {
|
| | | FollowFollowerNoticeVo followFollowerNoticeVo = new FollowFollowerNoticeVo();
|
| | | String title = followFollowerNoticeEntity.getTitle();
|
| | | String title = followFollowerNotice.getTitle();
|
| | | followFollowerNoticeVo.setTitle(title);
|
| | | String content = followFollowerNoticeEntity.getContent();
|
| | | String content = followFollowerNotice.getContent();
|
| | | followFollowerNoticeVo.setContent(content);
|
| | | Date createTime = followFollowerNotice.getCreateTime();
|
| | | followFollowerNoticeVo.setCreateTime(createTime);
|
| | | arrayList.add(followFollowerNoticeVo);
|
| | | }
|
| | | }
|