package com.chinaweal.aiccs.aiccs.abnormal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSWrit;
import com.chinaweal.aiccs.aiccs.abnormal.entity.dto.EntWritsDto;
import com.chinaweal.aiccs.aiccs.abnormal.mapper.TSWritMapper;
import com.chinaweal.aiccs.aiccs.abnormal.service.TSWritService;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.page.PageRequestDto;
import org.springframework.stereotype.Service;

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

/**
 * <p>
 * 监管文书文号信息 服务实现类
 * </p>
 *
 * @author <a href="https://blog.lroyia.top">lroyia</a>
 * @since 2021-01-19
 */
@Service
public class TSWritServiceImpl extends ServiceImpl<TSWritMapper, TSWrit> implements TSWritService {

    @Override
    public List<TSWrit> listTswrit(TSWrit tsWritModel) {
        return baseMapper.listTswrit(tsWritModel);
    }

    @Override
    public IPage<EntWritsDto> selectEntWrits(IPage<EntWritsDto> page, EntWritsDto entWritsModel) {
        return baseMapper.selectEntWrits(page,entWritsModel);
    }

    @Override
    public TSWrit selectTsWritByMap(Map<String, Object> paramTwr) {
        return baseMapper.selectTsWritByMap(paramTwr);
    }

    @Override
    public IPage<EntWritsDto> getWnbBatchPage(IPage<EntWritsDto> page) {
        return baseMapper.selectWnbBatchPage(page);

    }

    @Override
    public boolean saveBatchWithList(List<TSWrit> list) {
        return baseMapper.saveBatchWithList(list);
    }

    @Override
    public Page<EntWritsDto> queryByEntParam(PageRequestDto pageRequestDto) {
        Map<String, Object> customParamMap = pageRequestDto.getCustomParamMap();
        return baseMapper.queryByEntParam(new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()), customParamMap);
    }
}
