package org.springblade.modules.application.info.service.impl;

import org.springblade.modules.application.info.excel.ApplicationInfoExcel;
import org.springblade.modules.application.info.mapper.ApplicationInfoMapper;
import org.springblade.modules.application.info.pojo.entity.ApplicationInfoEntity;
import org.springblade.modules.application.info.pojo.vo.ApplicationInfoVO;
import org.springblade.modules.application.info.service.IApplicationInfoService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;

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

/**
 * 应用列表 服务实现类
 *
 * @author BladeX
 * @since 2024-10-15
 */
@Service
public class ApplicationInfoServiceImpl extends BaseServiceImpl<ApplicationInfoMapper, ApplicationInfoEntity> implements IApplicationInfoService {

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

	@Override
	public List<ApplicationInfoExcel> exportInfo(Wrapper<ApplicationInfoEntity> queryWrapper) {
		List<ApplicationInfoExcel> infoList = baseMapper.exportInfo(queryWrapper);
		//infoList.forEach(info -> {
		//	info.setTypeName(DictCache.getValue(DictEnum.YES_NO, Info.getType()));
		//});
		return infoList;
	}
}
