智慧保安后台管理-外网-验收版本
Administrator
2021-07-22 fd72a9045a8fc437b8c28bac0bdc98e0d29aa441
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 org.springblade.modules.apply.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springblade.modules.apply.entity.ExamPayment;
import org.springblade.modules.apply.mapper.ExamPaymentMapper;
import org.springblade.modules.apply.service.ApplyService;
import org.springblade.modules.apply.service.ExamPaymentService;
import org.springblade.modules.apply.vo.ExamPaymentVO;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * 考试缴费服务实现类
 * @author zhongrj
 */
@Service
@AllArgsConstructor
public class ExamPaymentServiceImpl extends ServiceImpl<ExamPaymentMapper, ExamPayment> implements ExamPaymentService {
 
    private final ApplyService applyService;
 
 
    /**
     * 自定义分页数据
     * @param page 分页条件
     * @param examPayment 考试缴费对象
     * @return
     */
    @Override
    public IPage<ExamPaymentVO> selectExamPaymentPage(IPage<ExamPaymentVO> page, ExamPaymentVO examPayment) {
        List<ExamPaymentVO> examPaymentVOS = baseMapper.selectExamPaymentPage(page, examPayment);
        for (ExamPaymentVO examPaymentVO : examPaymentVOS) {
            //查询人数
            examPaymentVO.setNum(applyService.getApplyNum(examPaymentVO.getApplyCode()));
        }
        return page.setRecords(examPaymentVOS);
    }
 
    /**
     * 详情
     * @param examPayment 考试缴费信息对象
     */
    @Override
    public ExamPaymentVO selectExamPaymentInfo(ExamPayment examPayment) {
        return baseMapper.selectExamPaymentInfo(examPayment);
    }
 
 
}