|
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);
|
}
|
|
|
}
|