package org.springblade.modules.rwxffkb.service.impl;

import org.springblade.modules.rwxffkb.entity.RwxffkbEntity;
import org.springblade.modules.rwxffkb.vo.RwxffkbVO;
import org.springblade.modules.rwxffkb.excel.RwxffkbExcel;
import org.springblade.modules.rwxffkb.mapper.RwxffkbMapper;
import org.springblade.modules.rwxffkb.service.IRwxffkbService;
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 ldx
 * @since 2023-09-13
 */
@Service
public class RwxffkbServiceImpl extends BaseServiceImpl<RwxffkbMapper, RwxffkbEntity> implements IRwxffkbService {

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

	@Override
	public List<RwxffkbExcel> exportRwxffkb(Wrapper<RwxffkbEntity> queryWrapper) {
		List<RwxffkbExcel> rwxffkbList = baseMapper.exportRwxffkb(queryWrapper);
		//rwxffkbList.forEach(rwxffkb -> {
		//	rwxffkb.setTypeName(DictCache.getValue(DictEnum.YES_NO, Rwxffkb.getType()));
		//});
		return rwxffkbList;
	}

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

	@Override
	public void updateByIdJl(RwxffkbEntity rwxffkb) {
		baseMapper.updateByIdJl(rwxffkb);
	}

}
