package org.springblade.swzdr.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.swzdr.excel.RyDjclExcel;
import org.springblade.swzdr.mapper.RyDjclMapper;
import org.springblade.swzdr.pojo.entity.RyDjclEntity;
import org.springblade.swzdr.pojo.vo.RyDjclVO;
import org.springblade.swzdr.service.IRyDjclService;
import org.springframework.stereotype.Service;

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

/**
 * 人员_打击处理 服务实现类
 *
 * @author BladeX
 * @since 2024-09-29
 */
@Service
public class RyDjclServiceImpl extends BaseServiceImpl<RyDjclMapper, RyDjclEntity> implements IRyDjclService {

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

	@Override
	public List<RyDjclExcel> exportRyDjcl(Wrapper<RyDjclEntity> queryWrapper) {
		List<RyDjclExcel> ryDjclList = baseMapper.exportRyDjcl(queryWrapper);
		//ryDjclList.forEach(ryDjcl -> {
		//	ryDjcl.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyDjcl.getType()));
		//});
		return ryDjclList;
	}

	@Override
	public List<RyDjclVO> getListByRyId(Long ryId) {
		return baseMapper.getListByRyId(ryId);
	}

}
