package com.dsh.account.service.impl;
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
import com.dsh.account.mapper.TStudentMapper;
|
import com.dsh.account.feignclient.other.ImgConfigClient;
|
import com.dsh.account.feignclient.other.model.TImgConfig;
|
import com.dsh.account.service.TAppUserService;
|
import com.dsh.account.entity.TAppUser;
|
import com.dsh.account.entity.TStudent;
|
import com.dsh.account.mapper.TAppUserMapper;
|
import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo;
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
import com.dsh.account.util.ResultUtil;
|
import com.dsh.account.util.ToolUtil;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 用户信息 服务实现类
|
* </p>
|
*
|
* @author administrator
|
* @since 2023-06-14
|
*/
|
@Service
|
public class TAppUserServiceImpl extends ServiceImpl<TAppUserMapper, TAppUser> implements TAppUserService {
|
|
@Autowired
|
private TStudentMapper tsmapper;
|
|
@Resource
|
private ImgConfigClient configClient;
|
|
@Override
|
public ClassInfoVo queryUserOfStus(Integer id) {
|
TAppUser tAppUser = this.baseMapper.selectById(id);
|
if (ToolUtil.isNotEmpty(tAppUser)){
|
List<TStudent> tStudents = tsmapper.selectList(new EntityWrapper<TStudent>()
|
.eq("appUserId",tAppUser.getId())
|
.eq("state",1));
|
ClassInfoVo classInfoVo = new ClassInfoVo();
|
if (null != tStudents){
|
|
}else {
|
classInfoVo.setIsThere(2);
|
List<TImgConfig> tImgConfigs = configClient.getNoneStuImgs();
|
if (tImgConfigs.size() > 0){
|
classInfoVo.setImgs(tImgConfigs.get(0).getContent());
|
}
|
}
|
}
|
return null;
|
}
|
|
|
/**
|
* 获取短信验证码
|
* @param type 1:登录,2:注册,3:修改密码,4:忘记密码
|
* @param phone
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
public ResultUtil getSMSCode(Integer type, String phone) throws Exception {
|
if(type == 2){
|
// this.baseMapper.selectOne(new EntityWrapper<>())
|
}
|
return null;
|
}
|
}
|