package org.springblade.modules.xlfk.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.xlfk.excel.XlfkExcel;
import org.springblade.modules.xlfk.mapper.XlfkMapper;
import org.springblade.modules.xlfk.pojo.entity.XlfkEntity;
import org.springblade.modules.xlfk.pojo.vo.XlfkVO;
import org.springblade.modules.xlfk.service.IXlfkService;
import org.springframework.stereotype.Service;

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

/**
 * 巡逻防控 服务实现类
 *
 * @author BladeX
 * @since 2024-11-06
 */
@Service
public class XlfkServiceImpl extends BaseServiceImpl<XlfkMapper, XlfkEntity> implements IXlfkService {

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

	@Override
	public List<XlfkExcel> exportXlfk(Wrapper<XlfkEntity> queryWrapper) {
		List<XlfkExcel> xlfkList = baseMapper.exportXlfk(queryWrapper);
		//xlfkList.forEach(xlfk -> {
		//	xlfk.setTypeName(DictCache.getValue(DictEnum.YES_NO, XlfkEntity.getType()));
		//});
		return xlfkList;
	}

}
