package org.springblade.modules.rhzf.wtfy.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.rhzf.wtfy.excel.RhzfWtfyExcel;
import org.springblade.modules.rhzf.wtfy.mapper.RhzfWtfyMapper;
import org.springblade.modules.rhzf.wtfy.pojo.entity.RhzfWtfyEntity;
import org.springblade.modules.rhzf.wtfy.pojo.vo.RhzfWtfyVO;
import org.springblade.modules.rhzf.wtfy.service.IRhzfWtfyService;
import org.springframework.stereotype.Service;

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

/**
 * 入户走访_问题反映 服务实现类
 *
 * @author wth
 * @since 2024-11-14
 */
@Service
public class RhzfWtfyServiceImpl extends BaseServiceImpl<RhzfWtfyMapper, RhzfWtfyEntity> implements IRhzfWtfyService {

	@Override
	public IPage<RhzfWtfyVO> selectRhzfWtfyPage(IPage<RhzfWtfyVO> page, RhzfWtfyVO rhzfWtfy) {
		return page.setRecords(baseMapper.selectRhzfWtfyPage(page, rhzfWtfy));
	}

	@Override
	public List<RhzfWtfyExcel> exportRhzfWtfy(Wrapper<RhzfWtfyEntity> queryWrapper) {
		List<RhzfWtfyExcel> rhzfWtfyList = baseMapper.exportRhzfWtfy(queryWrapper);
		//rhzfWtfyList.forEach(rhzfWtfy -> {
		//	rhzfWtfy.setTypeName(DictCache.getValue(DictEnum.YES_NO, RhzfWtfyEntity.getType()));
		//});
		return rhzfWtfyList;
	}

	@Override
	public List<RhzfWtfyEntity> getByDzbm(Map<String, Object> params) {
		return baseMapper.getByDzbm(params);
	}

}
