package org.springblade.modules.pfInfo.service.impl;

import org.springblade.modules.pfInfo.entity.PfInfoEntity;
import org.springblade.modules.pfInfo.vo.PfInfoVO;
import org.springblade.modules.pfInfo.excel.PfInfoExcel;
import org.springblade.modules.pfInfo.mapper.PfInfoMapper;
import org.springblade.modules.pfInfo.service.PfInfoService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * 手动打分 服务实现类
 *
 * @author BladeX
 * @since 2023-07-13
 */
@Service
public class PfInfoServiceImpl extends BaseServiceImpl<PfInfoMapper, PfInfoEntity> implements PfInfoService {

	@Override
	public IPage<PfInfoVO> selectInfoPage(IPage<PfInfoVO> page, Map<String, Object> params) {
		return page.setRecords(baseMapper.selectInfoPage(page, params));
	}


	@Override
	public List<PfInfoExcel> exportInfo(Wrapper<PfInfoEntity> queryWrapper) {
		List<PfInfoExcel> infoList = baseMapper.exportInfo(queryWrapper);
		//infoList.forEach(info -> {
		//	info.setTypeName(DictCache.getValue(DictEnum.YES_NO, Info.getType()));
		//});
		return infoList;
	}

	@Override
	public int getDzbhdCs(Map<String, Object> params) {
		return baseMapper.getDzbhdCs(params);
	}

	@Override
	public IPage<PfInfoVO> pageApp(IPage<PfInfoVO> page, Map<String, Object> params) {
		return page.setRecords(baseMapper.pageApp(page, params));
	}

}
