| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.other.mapper.VipSettingMapper; |
| | | import com.ruoyi.other.api.domain.VipSetting; |
| | | import com.ruoyi.other.service.VipSettingService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class VipSettingServiceImpl extends ServiceImpl<VipSettingMapper, VipSetting> implements VipSettingService { |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Override |
| | | public VipSetting getVipSettingByUserId(Long userId) { |
| | | AppUser appUser = appUserClient.getAppUserById(userId); |
| | | if(null == appUser){ |
| | | throw new ServiceException("用户不存在"); |
| | | } |
| | | return this.getById(appUser.getVipId()); |
| | | } |
| | | } |