package com.xcong.excoin.modules.documentary.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.xcong.excoin.common.LoginUserUtils; import com.xcong.excoin.common.response.Result; import com.xcong.excoin.modules.documentary.dao.FollowTraderProfitInfoDao; import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity; import com.xcong.excoin.modules.documentary.service.DocumentaryService; import com.xcong.excoin.modules.documentary.vo.MemberIsTradeVo; import com.xcong.excoin.modules.member.dao.MemberDao; import com.xcong.excoin.modules.member.entity.MemberEntity; import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class DocumentaryServiceImpl extends ServiceImpl implements DocumentaryService { @Resource private MemberDao memberDao; @Override public Result getMemberIsTradeInfo() { //获取用户ID Long memberId = LoginUserUtils.getAppLoginUser().getId(); MemberEntity member = memberDao.selectById(memberId); Integer isTrader = member.getIsTrader(); MemberIsTradeVo memberIsTradeVo = new MemberIsTradeVo(); if(MemberEntity.IS_TRADER_Y.equals(isTrader)) { memberIsTradeVo.setIsTrade(MemberEntity.IS_TRADER_Y); }else { memberIsTradeVo.setIsTrade(MemberEntity.IS_TRADER_N); } return Result.ok(memberIsTradeVo); } }