package org.springblade.modules.sqmy.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.sqmy.excel.SqmyRyExcel;
import org.springblade.modules.sqmy.mapper.SqmyRyMapper;
import org.springblade.modules.sqmy.pojo.entity.SqmyRyEntity;
import org.springblade.modules.sqmy.pojo.vo.SqmyRyVO;
import org.springblade.modules.sqmy.service.ISqmyRyService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社情民意_线索提供人 服务实现类
 *
 * @author wth
 * @since 2024-11-12
 */
@Service
public class SqmyRyServiceImpl extends BaseServiceImpl<SqmyRyMapper, SqmyRyEntity> implements ISqmyRyService {

	@Override
	public IPage<SqmyRyVO> selectSqmyRyPage(IPage<SqmyRyVO> page, SqmyRyVO sqmyRy) {
		return page.setRecords(baseMapper.selectSqmyRyPage(page, sqmyRy));
	}

	@Override
	public List<SqmyRyExcel> exportSqmyRy(Wrapper<SqmyRyEntity> queryWrapper) {
		List<SqmyRyExcel> sqmyRyList = baseMapper.exportSqmyRy(queryWrapper);
		//sqmyRyList.forEach(sqmyRy -> {
		//	sqmyRy.setTypeName(DictCache.getValue(DictEnum.YES_NO, SqmyRyEntity.getType()));
		//});
		return sqmyRyList;
	}

}
