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.JmhInfoExcel;
import org.springblade.modules.sqmy.mapper.JmhInfoMapper;
import org.springblade.modules.sqmy.pojo.entity.JmhInfoEntity;
import org.springblade.modules.sqmy.pojo.vo.JmhInfoVO;
import org.springblade.modules.sqmy.service.IJmhInfoService;
import org.springframework.stereotype.Service;

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

/**
 * 每周见面会 服务实现类
 *
 * @author wth
 * @since 2024-11-12
 */
@Service
public class JmhInfoServiceImpl extends BaseServiceImpl<JmhInfoMapper, JmhInfoEntity> implements IJmhInfoService {

	@Override
	public IPage<JmhInfoVO> selectJmhInfoPage(IPage<JmhInfoVO> page, Map<String, Object> params) {
		return page.setRecords(baseMapper.selectJmhInfoPage(page, params));
	}

	@Override
	public List<JmhInfoExcel> exportJmhInfo(Wrapper<JmhInfoEntity> queryWrapper) {
		List<JmhInfoExcel> jmhInfoList = baseMapper.exportJmhInfo(queryWrapper);
		//jmhInfoList.forEach(jmhInfo -> {
		//	jmhInfo.setTypeName(DictCache.getValue(DictEnum.YES_NO, JmhInfoEntity.getType()));
		//});
		return jmhInfoList;
	}

	@Override
	public JmhInfoEntity getBzJmh(Map<String, Object> params) {
		return baseMapper.getBzJmh(params);
	}

	@Override
	public JmhInfoVO detailById(Long id) {
		return baseMapper.detailById(id);
	}

}
