| | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUserApplet; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.mapper.TAppUserMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.AppUserListQuery; |
| | |
| | | @Autowired |
| | | private TIntegralSettlementService tIntegralSettlementService; |
| | | |
| | | @Autowired |
| | | private TCompanyService tCompanyService; |
| | | |
| | | @Override |
| | | public PageInfo<TAppUser> pageList(AppUserListQuery query) { |
| | | PageInfo<TAppUser> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | |
| | | log.info("推广员不存在,绑定superiorId={}", superiorId); |
| | | } |
| | | } else { |
| | | if (appUser.getReferrerStatus().equals(1)) { |
| | | if (Objects.isNull(appUser.getReferrerStatus()) || appUser.getReferrerStatus().equals(1)) { |
| | | appUser.setReferrerUserId(superiorId); |
| | | appUser.setReferrerTime(LocalDateTime.now()); |
| | | appUser.setReferrerStatus(1); |
| | | } |
| | | } |
| | | this.updateById(appUser); |
| | |
| | | |
| | | @Override |
| | | public List<PromotionPageListVo> promotionPageList(Page<PromotionPageListVo> page, PromotionPageListQuery query) { |
| | | if (Objects.isNull(query.getCompanyId())) { |
| | | throw new ServiceException("公司ID不能为空"); |
| | | } |
| | | List<PromotionPageListVo> list = this.baseMapper.promotionPageList(page,query); |
| | | |
| | | if (!list.isEmpty()) { |
| | |
| | | List<TAppUser> list = this.baseMapper.exportAppUser(query); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public TCompany getUserCompany(Integer appUserId) { |
| | | //默认返回空对象 |
| | | TCompany company = new TCompany(); |
| | | TAppUser appUser = this.getById(appUserId); |
| | | if (Objects.nonNull(appUser) && Objects.nonNull(appUser.getCompanyId())) { |
| | | company = tCompanyService.getById(appUser.getCompanyId()); |
| | | } |
| | | return company; |
| | | } |
| | | } |