MatchScheduleServiceImpl.java
2.29 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.zhongzhi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhongzhi.common.constant.ProjectType;
import com.zhongzhi.dao.MatchDictDAO;
import com.zhongzhi.model.MatchDictDO;
import com.zhongzhi.model.MatchScheduleDO;
import com.zhongzhi.dao.MatchScheduleDAO;
import com.zhongzhi.service.MatchScheduleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 时间安排 服务实现类
* </p>
*
* @author DengMin
* @since 2021-05-27
*/
@Service
public class MatchScheduleServiceImpl extends ServiceImpl<MatchScheduleDAO, MatchScheduleDO> implements MatchScheduleService {
@Autowired
private MatchDictDAO matchDictDAO;
@Override
public List<MatchScheduleDO> getMatchSchedule(MatchScheduleDO matchScheduleDO) {
MatchDictDO matchDictDO = matchDictDAO.selectOne(new QueryWrapper<MatchDictDO>()
.lambda()
.eq(MatchDictDO::getId, matchScheduleDO.getMatchId())
.eq(MatchDictDO::getMatchType, ProjectType.SEED_TRACK)
.eq(MatchDictDO::getStatus, 1));
List<MatchScheduleDO> list = new ArrayList<>();
if (matchDictDO != null) {
list = this.baseMapper.selectList(new QueryWrapper<MatchScheduleDO>()
.lambda()
.eq(MatchScheduleDO::getMatchId, matchDictDO.getId()));
}
return list;
}
@Override
public List<MatchScheduleDO> getVocationalMatchSchedule(MatchScheduleDO matchScheduleDO) {
MatchDictDO matchDictDO = matchDictDAO.selectOne(new QueryWrapper<MatchDictDO>()
.lambda()
.eq(MatchDictDO::getId, matchScheduleDO.getMatchId())
.eq(MatchDictDO::getMatchType, ProjectType.VOCATIONAL)
.eq(MatchDictDO::getStatus, 1));
List<MatchScheduleDO> list = new ArrayList<>();
if (matchDictDO != null) {
list = this.baseMapper.selectList(new QueryWrapper<MatchScheduleDO>()
.lambda()
.eq(MatchScheduleDO::getMatchId, matchDictDO.getId()));
}
return list;
}
}