Helius
2021-01-20 a4ea7a8d531f562c898c9fead98d14d6c85581db
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
@@ -24,8 +24,10 @@
import com.xcong.excoin.modules.contract.parameter.vo.*;
import com.xcong.excoin.modules.contract.service.ContractHoldOrderService;
import com.xcong.excoin.modules.documentary.dao.FollowFollowerOrderRelationDao;
import com.xcong.excoin.modules.documentary.dao.FollowFollowerProfitDao;
import com.xcong.excoin.modules.documentary.dao.FollowTraderInfoDao;
import com.xcong.excoin.modules.documentary.entity.FollowFollowerOrderRelationEntity;
import com.xcong.excoin.modules.documentary.entity.FollowFollowerProfitEntity;
import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
import com.xcong.excoin.modules.member.dao.MemberDao;
import com.xcong.excoin.modules.member.dao.MemberLevelRateDao;
@@ -86,8 +88,12 @@
    @Resource
    private MemberDao memberDao;
    @Resource
    private MemberSettingDao memberSettingDao;
    @Resource
    private FollowFollowerProfitDao followFollowerProfitDao;
    @Resource
    private FollowTraderInfoDao followTraderInfoDao;
@@ -970,6 +976,15 @@
        if (CollUtil.isNotEmpty(list) || CollUtil.isNotEmpty(entrustList)) {
            return Result.fail("存在持仓/委托, 无法更改");
        }
        /**
         * 验证用户是否存在跟随交易员
         * 是:不允许切换成全仓模式
         */
        List<FollowFollowerProfitEntity> followFollowerProfitEntitys = followFollowerProfitDao.selectByMemberIdandIsFollow(member.getId(),FollowFollowerProfitEntity.IS_FOLLOW_Y);
        if(CollUtil.isNotEmpty(followFollowerProfitEntitys)) {
           return Result.fail(MessageSourceUtils.getString("documentary_service_0018"));
        }
        Integer positionType = member.getContractPositionType() == ContractEntrustOrderEntity.POSITION_TYPE_ADD ? ContractEntrustOrderEntity.POSITION_TYPE_ALL : ContractEntrustOrderEntity.POSITION_TYPE_ADD;
        MemberEntity updateEntity = new MemberEntity();