package com.ningdatech.kqapi.zzsfw.manage;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.kqapi.zzsfw.constants.ZzsfwMenuConstant;
import com.ningdatech.kqapi.zzsfw.entity.dto.DscSxAdsShareItemQltQlsxCommonIDVKqDTO;
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMattersDeduplicateDTO;
import com.ningdatech.kqapi.zzsfw.entity.dto.NdKqZzsfwMenuDTO;
import com.ningdatech.kqapi.zzsfw.entity.entity.DscSxAdsShareItemQltQlsxCommonIDVKq;
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMattersDeduplicate;
import com.ningdatech.kqapi.zzsfw.entity.entity.NdKqZzsfwMenu;
import com.ningdatech.kqapi.zzsfw.entity.vo.MatterTopVO;
import com.ningdatech.kqapi.zzsfw.entity.vo.TreeVO;
import com.ningdatech.kqapi.zzsfw.service.IDscSxAdsShareItemQltQlsxCommonIDVKqService;
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMatterDeduplicateService;
import com.ningdatech.kqapi.zzsfw.service.INdKqZzsfwMenuService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.*;
import java.util.stream.Collectors;

/**
 * @Classname MatterManage
 * @Description
 * @Date 2023/10/25 14:55
 * @Author PoffyZhang
 */
@Component
@Slf4j
@RequiredArgsConstructor
public class QlManage {

    private final IDscSxAdsShareItemQltQlsxCommonIDVKqService kqService;

    public List<DscSxAdsShareItemQltQlsxCommonIDVKq> search(DscSxAdsShareItemQltQlsxCommonIDVKqDTO dto) {
        List<DscSxAdsShareItemQltQlsxCommonIDVKq> list = kqService.list(Wrappers.lambdaQuery(DscSxAdsShareItemQltQlsxCommonIDVKq.class)
                .eq(StringUtils.isNotBlank(dto.getRowguid()), DscSxAdsShareItemQltQlsxCommonIDVKq::getRowguid, dto.getRowguid())
                .eq(StringUtils.isNotBlank(dto.getQlName()), DscSxAdsShareItemQltQlsxCommonIDVKq::getQlName, dto.getQlName())
                .eq(StringUtils.isNotBlank(dto.getWebapplyurl()), DscSxAdsShareItemQltQlsxCommonIDVKq::getWebapplyurl, dto.getWebapplyurl())
        );
        return list;
    }
}
