mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
package com.panzhihua.service_community.service.impl;
 
import java.util.ArrayList;
import java.util.List;
 
import org.springframework.stereotype.Service;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO;
import com.panzhihua.service_community.dao.ComActReserveSubMapper;
import com.panzhihua.service_community.model.dos.ComActReserveSubDO;
import com.panzhihua.service_community.service.ComActReserveSubService;
 
import lombok.extern.slf4j.Slf4j;
 
/**
 * @auther lyq
 * @create 2021-08-23 10:34:03
 * @describe 预约登记题目选项服务实现类
 */
@Slf4j
@Service
public class ComActReserveSubServiceImpl extends ServiceImpl<ComActReserveSubMapper, ComActReserveSubDO> implements ComActReserveSubService {
 
    /**
     * 查询预约登记题目列表
     * @param reserveId 预约登记id
     * @return  约登记题目列表
     */
    @Override
    public R subjectListAdmin(Long reserveId){
        List<ComActReserveSubListVO> resultList = new ArrayList<>(100);
        resultList.add(new ComActReserveSubListVO("nub","序号"));
        resultList.add(new ComActReserveSubListVO("time","登记时间"));
        resultList.add(new ComActReserveSubListVO("nickName","用户昵称"));
        List<ComActReserveSubListVO> subList = this.baseMapper.getReserveSubjectList(reserveId);
        if(subList != null && !subList.isEmpty()){
            subList.forEach(list -> {
                if(!list.getType().equals(5)){
                    resultList.add(list);
                }
            });
//            resultList.addAll(list);
        }
        resultList.add(new ComActReserveSubListVO("id","登记流水"));
        return R.ok(resultList);
    }
 
    @Override
    public List<String> subjectSelectionListAdmin(Long reserveSubId) {
        return baseMapper.subjectSelectionListAdmin(reserveSubId);
    }
 
}