lisy
2023-06-14 6a4b079181d22a54a11dfdafd5400b171a1f3fc4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.dsh.app.service.impl;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.dsh.app.entity.TAppUser;
import com.dsh.app.entity.TStudent;
import com.dsh.app.feignclient.other.ImgConfigClient;
import com.dsh.app.feignclient.other.model.TImgConfig;
import com.dsh.app.mapper.TAppUserMapper;
import com.dsh.app.mapper.TStudentMapper;
import com.dsh.app.model.vo.classDetails.classInsVo.ClassInfoVo;
import com.dsh.app.service.TAppUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dsh.account.util.ToolUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
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;
 
    @Autowired
    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;
    }
}