PubCluePoolServiceImpl.java
1.77 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
package cn.fw.valhalla.service.data.impl;
import cn.fw.valhalla.dao.mapper.PubCluePoolMapper;
import cn.fw.valhalla.domain.db.pub.PubCluePool;
import cn.fw.valhalla.domain.dto.FollowPoolDTO;
import cn.fw.valhalla.domain.dto.PubCluePoolReportDTO;
import cn.fw.valhalla.domain.dto.PubCluePoolReportQueryDTO;
import cn.fw.valhalla.domain.query.FollowPoolQueryVO;
import cn.fw.valhalla.service.data.PubCluePoolService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
/**
* 公共池线索
*
* @author : kurisu
* @version : 1.0
* @className : PubCluePoolServiceImpl
* @description : 公共池线索
* @date : 2023-03-20 10:36
*/
@Slf4j
@Service
public class PubCluePoolServiceImpl extends ServiceImpl<PubCluePoolMapper, PubCluePool> implements PubCluePoolService {
@Override
public List<FollowPoolDTO> followList(FollowPoolQueryVO queryVO) {
Integer current = queryVO.getCurrent();
Integer pageSize = queryVO.getPageSize();
Integer startIndex = (current - 1) * pageSize;
return Optional.ofNullable(getBaseMapper().followList(startIndex, pageSize, queryVO)).orElse(new ArrayList<>());
}
@Override
public long followListCount(FollowPoolQueryVO queryVO) {
return Optional.ofNullable(getBaseMapper().followListCount(queryVO)).orElse(0L);
}
/**
* 查询站岗分配
* @param dto
* @return
*/
@Override
public List<PubCluePoolReportDTO> countPubCluePoolList(PubCluePoolReportQueryDTO dto){
return Optional.ofNullable(getBaseMapper().countPubCluePoolList(dto)).orElse(Collections.emptyList());
}
}