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.RyXfqtExcel;
import org.springblade.swzdr.mapper.RyXfqtMapper;
import org.springblade.swzdr.pojo.entity.RyXfqtEntity;
import org.springblade.swzdr.pojo.vo.RyXfqtVO;
import org.springblade.swzdr.service.IRyXfqtService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员_信访群体关联表 服务实现类
 *
 * @author BladeX
 * @since 2024-09-12
 */
@Service
public class RyXfqtServiceImpl extends BaseServiceImpl<RyXfqtMapper, RyXfqtEntity> implements IRyXfqtService {

	@Override
	public IPage<RyXfqtVO> selectRyXfqtPage(IPage<RyXfqtVO> page, RyXfqtVO ryXfqt) {
		return page.setRecords(baseMapper.selectRyXfqtPage(page, ryXfqt));
	}

	@Override
	public List<RyXfqtExcel> exportRyXfqt(Wrapper<RyXfqtEntity> queryWrapper) {
		List<RyXfqtExcel> ryXfqtList = baseMapper.exportRyXfqt(queryWrapper);
		//ryXfqtList.forEach(ryXfqt -> {
		//	ryXfqt.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyXfqt.getType()));
		//});
		return ryXfqtList;
	}

}
