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

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chinaweal.aiccs.aicbiz.entity.TbBatchGsList;
import com.chinaweal.aiccs.aicbiz.mapper.TbBatchGsListMapper;
import com.chinaweal.aiccs.aicbiz.service.TbBatchGsListService;
import com.chinaweal.aiccs.common.util.StringUtils;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 * 47.8批量吊销公示文书列表 服务实现类
 * </p>
 *
 * @author Lee
 * @since 2022-03-28
 */
@Service
public class TbBatchGsListServiceImpl extends BaseServiceImpl<TbBatchGsListMapper, TbBatchGsList> implements TbBatchGsListService {

    @Override
    public IPage<TbBatchGsList> queryRevokeWritsByName(IPage<TbBatchGsList> page, Map<String, Object> param) {
        LambdaQueryWrapper<TbBatchGsList> wrapper = new LambdaQueryWrapper<>();
        String entName = StringUtils.tranObject(param.get("entName"));
        String sgstype = StringUtils.tranObject(param.get("sgstype"));
        wrapper.eq(TbBatchGsList::getDelflag,"0")
                .like(StringUtils.isNotEmpty(entName),TbBatchGsList::getSname,entName)
                .eq(StringUtils.isNotEmpty(sgstype),TbBatchGsList::getSgstype,sgstype)
                .orderByDesc(TbBatchGsList::getSpublictime).orderByDesc(TbBatchGsList::getSbookcode);
        return page(page,wrapper);
//        return baseMapper.selectRevocationTzsByNameList(page,param);
    }
}
