| | |
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.vip.UserVIPLevelMapper;
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.dto.vip.UserVIPLevel;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserVIPPreInfoService userVIPPreInfoService;
|
| | | |
| | | @Resource
|
| | | private UserVIPLevelMapper userVIPLevelMapper;
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public UserInviteLevelEnum getUserInviteLevel(Long uid) {
|
| | |
| | | return UserInviteLevelEnum.actived;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public boolean verifyVIP(Long uid) {
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | return false;
|
| | | }
|
| | | |
| | | UserVIPInfo info = userVIPInfoService.selectByUid(uid);
|
| | | if (info != null && info.getState() == UserVIPInfo.STATE_SUCCESS) {
|
| | | return true;
|
| | | }
|
| | | |
| | | UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | | if (userVIPPreInfo != null) {
|
| | | return true;
|
| | | }
|
| | | |
| | | return false;
|
| | | }
|
| | | |
| | | |
| | | |
| | | @Override
|
| | | public UserVIPLevel getVIPLevelByUid(Long uid) {
|
| | | return userVIPLevelMapper.getLevelByUid(uid);
|
| | | }
|
| | | }
|