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.RyShgxExcel;
import org.springblade.swzdr.mapper.RyShgxMapper;
import org.springblade.swzdr.pojo.entity.RyShgxEntity;
import org.springblade.swzdr.pojo.vo.RyShgxVO;
import org.springblade.swzdr.service.IRyShgxService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员_社会关系信息 服务实现类
 *
 * @author BladeX
 * @since 2024-09-12
 */
@Service
public class RyShgxServiceImpl extends BaseServiceImpl<RyShgxMapper, RyShgxEntity> implements IRyShgxService {

	@Override
	public IPage<RyShgxVO> selectRyShgxPage(IPage<RyShgxVO> page, RyShgxVO ryShgx) {
		return page.setRecords(baseMapper.selectRyShgxPage(page, ryShgx));
	}

	@Override
	public List<RyShgxExcel> exportRyShgx(Wrapper<RyShgxEntity> queryWrapper) {
		List<RyShgxExcel> ryShgxList = baseMapper.exportRyShgx(queryWrapper);
		//ryShgxList.forEach(ryShgx -> {
		//	ryShgx.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyShgx.getType()));
		//});
		return ryShgxList;
	}

}
