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

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.xpgxb.entity.XpgxbEntity;
import org.springblade.modules.xpgxb.excel.XpgxbExcel;
import org.springblade.modules.xpgxb.mapper.XpgxbMapper;
import org.springblade.modules.xpgxb.service.IXpgxbService;
import org.springframework.stereotype.Service;

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

/**
 * 下派关系表 服务实现类
 *
 * @author BladeX
 * @since 2023-07-09
 */
@Service
public class XpgxbServiceImpl extends BaseServiceImpl<XpgxbMapper, XpgxbEntity> implements IXpgxbService {

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

	@Override
	public List<XpgxbExcel> exportXpgxb(Wrapper<XpgxbEntity> queryWrapper) {
		List<XpgxbExcel> xpgxbList = baseMapper.exportXpgxb(queryWrapper);
		//xpgxbList.forEach(xpgxb -> {
		//	xpgxb.setTypeName(DictCache.getValue(DictEnum.YES_NO, Xpgxb.getType()));
		//});
		return xpgxbList;
	}
}
