package org.springblade.modules.bq.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.bq.excel.BqSpExcel;
import org.springblade.modules.bq.mapper.BqSpMapper;
import org.springblade.modules.bq.pojo.entity.BqSpEntity;
import org.springblade.modules.bq.pojo.vo.BqSpVO;
import org.springblade.modules.bq.service.IBqSpService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 标签_审批 服务实现类
 *
 * @author wth
 * @since 2024-11-25
 */
@Service
public class BqSpServiceImpl extends BaseServiceImpl<BqSpMapper, BqSpEntity> implements IBqSpService {

	@Override
	public IPage<BqSpVO> selectBqSpPage(IPage<BqSpVO> page, BqSpVO bqSp) {
		return page.setRecords(baseMapper.selectBqSpPage(page, bqSp));
	}

	@Override
	public List<BqSpExcel> exportBqSp(Wrapper<BqSpEntity> queryWrapper) {
		List<BqSpExcel> bqSpList = baseMapper.exportBqSp(queryWrapper);
		//bqSpList.forEach(bqSp -> {
		//	bqSp.setTypeName(DictCache.getValue(DictEnum.YES_NO, BqSpEntity.getType()));
		//});
		return bqSpList;
	}

}
