package org.springblade.modules.wgr.info.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.wgr.info.entity.WgrInfoEntity;
import org.springblade.modules.wgr.info.excel.WgrInfoExcel;
import org.springblade.modules.wgr.info.mapper.WgrInfoMapper;
import org.springblade.modules.wgr.info.service.IWgrInfoService;
import org.springblade.modules.wgr.info.vo.WgrInfoVO;
import org.springframework.stereotype.Service;

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

/**
 * 出入境_外国人信息表 服务实现类
 *
 * @author BladeX
 * @since 2023-12-04
 */
@Service
public class WgrInfoServiceImpl extends BaseServiceImpl<WgrInfoMapper, WgrInfoEntity> implements IWgrInfoService {

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

	@Override
	public List<WgrInfoExcel> exportWgrInfo(Wrapper<WgrInfoEntity> queryWrapper) {
		List<WgrInfoExcel> wgrinfoList = baseMapper.exportWgrInfo(queryWrapper);
		//wgrinfoList.forEach(wgrinfo -> {
		//	wgrinfo.setTypeName(DictCache.getValue(DictEnum.YES_NO, WgrInfo.getType()));
		//});
		return wgrinfoList;
	}

	@Override
	public int getIsExist(WgrInfoExcel wgrInfoExcel) {
		return baseMapper.getIsExist(wgrInfoExcel);
	}

	@Override
	public void updateWgrinfo(WgrInfoExcel wgrInfoExcel) {
		baseMapper.updateWgrinfo(wgrInfoExcel);
	}

	@Override
	public void resetBm(Long wgrId) {
		baseMapper.resetBm(wgrId);
	}

	@Override
	public void plxf(String id) {
		baseMapper.plxf(id);
	}

}
