| | |
| | | import javax.annotation.Resource;
|
| | | import javax.validation.Valid;
|
| | |
|
| | | import com.xcong.excoin.modules.documentary.common.NoticeConstant;
|
| | | import com.xcong.excoin.utils.*;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | 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;
|
| | |
| | | import com.xcong.excoin.modules.member.entity.MemberLevelRateEntity;
|
| | | import com.xcong.excoin.modules.member.entity.MemberWalletContractEntity;
|
| | | import com.xcong.excoin.modules.platform.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.utils.CacheSettingUtils;
|
| | | import com.xcong.excoin.utils.CoinTypeConvert;
|
| | | import com.xcong.excoin.utils.MessageSourceUtils;
|
| | | import com.xcong.excoin.utils.RedisUtils;
|
| | |
|
| | | import cn.hutool.core.collection.CollUtil;
|
| | | import cn.hutool.core.util.ObjectUtil;
|
| | |
| | |
|
| | | // 回报率
|
| | | BigDecimal returnRate = rewardRatio.divide(contractHoldOrderEntity.getBondAmount().subtract(contractHoldOrderEntity.getOpeningFeeAmount()), 8, BigDecimal.ROUND_DOWN);
|
| | | myFollowOrderVo.setRewardRatio(returnRate.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | myFollowOrderVo.setRewardRatio(returnRate.setScale(4, BigDecimal.ROUND_DOWN));
|
| | |
|
| | | myFollowOrderVos.add(myFollowOrderVo);
|
| | | }
|
| | |
| | | String phone = memberEntity.getPhone();
|
| | | String email = memberEntity.getEmail();
|
| | | if(StrUtil.isNotEmpty(phone)) {
|
| | | myFollowTraderInfoVo.setAccount(phone);
|
| | | myFollowTraderInfoVo.setNickName(phone);
|
| | | }else {
|
| | | myFollowTraderInfoVo.setAccount(email);
|
| | | myFollowTraderInfoVo.setNickName(email);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | 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);
|
| | |
|
| | | FollowTraderInfoEntity traderInfoEntity = followTraderInfoDao.selectTraderInfoByMemberId(memberId);
|
| | |
|
| | | if (traderInfoEntity != null) {
|
| | | LogRecordUtils.insertFollowerNotice(memberId, NoticeConstant.STOP_FOLLOW_TITLE, StrUtil.format(NoticeConstant.STOP_FOLLOW_CONTENT, traderInfoEntity.getNickname()));
|
| | | }
|
| | | return Result.ok(MessageSourceUtils.getString("member_service_0026"));
|
| | | }
|
| | |
|
| | |
|
| | |
|