package com.tofly.xrtygis.custom.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.common.core.util.StringUtil;
import com.tofly.xrtygis.custom.service.CustomKhService;
import com.tofly.xrtygis.entity.Qfkhjbxx;
import com.tofly.xrtygis.service.QfkhjbxxService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

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

/**
 * @author FlashWJL
 * @date 2021/3/29 14:01
 */
@Service
@AllArgsConstructor
public class CustomKhServiceImpl implements CustomKhService {
    private final QfkhjbxxService qfkhjbxxService;

    @Override
    public IPage getKh(Page page, Qfkhjbxx khxx) {
        return qfkhjbxxService.page(page, Wrappers.<Qfkhjbxx>lambdaQuery()
                .eq(StringUtil.isNotEmpty(khxx.getLxdh()),Qfkhjbxx::getLxdh,khxx.getLxdh())
                .like(StringUtil.isNotEmpty(khxx.getYhxm()),Qfkhjbxx::getYhxm,khxx.getYhxm())
                .like(StringUtil.isNotEmpty(khxx.getYhbh()),Qfkhjbxx::getYhbh,khxx.getYhbh()));
    }


}
