package org.springblade.swzdr.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.swzdr.excel.RyFwExcel;
import org.springblade.swzdr.mapper.RyFwMapper;
import org.springblade.swzdr.pojo.entity.RyFwEntity;
import org.springblade.swzdr.pojo.vo.RyFwVO;
import org.springblade.swzdr.service.IRyFwService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员_房屋信息 服务实现类
 *
 * @author BladeX
 * @since 2024-09-12
 */
@Service
public class RyFwServiceImpl extends BaseServiceImpl<RyFwMapper, RyFwEntity> implements IRyFwService {

	@Override
	public IPage<RyFwVO> selectRyFwPage(IPage<RyFwVO> page, RyFwVO ryFw) {
		return page.setRecords(baseMapper.selectRyFwPage(page, ryFw));
	}

	@Override
	public List<RyFwExcel> exportRyFw(Wrapper<RyFwEntity> queryWrapper) {
		List<RyFwExcel> ryFwList = baseMapper.exportRyFw(queryWrapper);
		//ryFwList.forEach(ryFw -> {
		//	ryFw.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyFw.getType()));
		//});
		return ryFwList;
	}

}
