FollowClueServiceImpl.java
1.79 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
package cn.fw.valhalla.service.data.impl;
import cn.fw.valhalla.dao.mapper.FollowClueMapper;
import cn.fw.valhalla.domain.db.follow.FollowClue;
import cn.fw.valhalla.domain.dto.FollowClueDTO;
import cn.fw.valhalla.domain.query.CustomerCluePoolQueryVO;
import cn.fw.valhalla.service.data.FollowClueService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* 跟进线索
*
* @author : kurisu
* @version : 1.0
* @className : FollowClueServiceImpl
* @description : 跟进线索
* @date : 2022-07-22 18:00
*/
@Service
public class FollowClueServiceImpl extends ServiceImpl<FollowClueMapper, FollowClue> implements FollowClueService {
@Override
public List<FollowClueDTO> clueList(CustomerCluePoolQueryVO queryVO) {
Integer current = queryVO.getCurrent();
Integer pageSize = queryVO.getPageSize();
Integer startIndex = (current - 1) * pageSize;
return Optional.ofNullable(getBaseMapper().clueList(startIndex, pageSize, queryVO)).orElse(new ArrayList<>());
}
@Override
public Long clueListCount(CustomerCluePoolQueryVO queryVO) {
return Optional.ofNullable(getBaseMapper().clueListCount(queryVO)).orElse(0L);
}
@Override
public Long completeNum(CustomerCluePoolQueryVO queryVO) {
return Optional.ofNullable(getBaseMapper().completeNum(queryVO)).orElse(0L);
}
@Override
public Long defeatNum(CustomerCluePoolQueryVO queryVO) {
return Optional.ofNullable(getBaseMapper().defeatNum(queryVO)).orElse(0L);
}
@Override
public Long onGoingNum(CustomerCluePoolQueryVO queryVO) {
return Optional.ofNullable(getBaseMapper().onGoingNum(queryVO)).orElse(0L);
}
}