package cn.ibizlab.businesscentral.core.base.filter;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;

import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;


import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.base.domain.KnowledgeArticle;
/**
 * 关系型数据实体[KnowledgeArticle] 查询条件对象
 */
@Slf4j
@Data
public class KnowledgeArticleSearchContext extends QueryWrapperContext<KnowledgeArticle> {

	private Integer n_statuscode_eq;//[状态描述]
	public void setN_statuscode_eq(Integer n_statuscode_eq) {
        this.n_statuscode_eq = n_statuscode_eq;
        if(!ObjectUtils.isEmpty(this.n_statuscode_eq)){
            this.getSearchCond().eq("statuscode", n_statuscode_eq);
        }
    }
	private Integer n_statecode_eq;//[状态]
	public void setN_statecode_eq(Integer n_statecode_eq) {
        this.n_statecode_eq = n_statecode_eq;
        if(!ObjectUtils.isEmpty(this.n_statecode_eq)){
            this.getSearchCond().eq("statecode", n_statecode_eq);
        }
    }
	private String n_review_eq;//[审阅]
	public void setN_review_eq(String n_review_eq) {
        this.n_review_eq = n_review_eq;
        if(!ObjectUtils.isEmpty(this.n_review_eq)){
            this.getSearchCond().eq("review", n_review_eq);
        }
    }
	private String n_title_like;//[标题]
	public void setN_title_like(String n_title_like) {
        this.n_title_like = n_title_like;
        if(!ObjectUtils.isEmpty(this.n_title_like)){
            this.getSearchCond().like("title", n_title_like);
        }
    }
	private String n_expiredreviewoptions_eq;//[已过期审阅选项]
	public void setN_expiredreviewoptions_eq(String n_expiredreviewoptions_eq) {
        this.n_expiredreviewoptions_eq = n_expiredreviewoptions_eq;
        if(!ObjectUtils.isEmpty(this.n_expiredreviewoptions_eq)){
            this.getSearchCond().eq("expiredreviewoptions", n_expiredreviewoptions_eq);
        }
    }
	private String n_parentarticlecontentid_eq;//[父文章内容 ID]
	public void setN_parentarticlecontentid_eq(String n_parentarticlecontentid_eq) {
        this.n_parentarticlecontentid_eq = n_parentarticlecontentid_eq;
        if(!ObjectUtils.isEmpty(this.n_parentarticlecontentid_eq)){
            this.getSearchCond().eq("parentarticlecontentid", n_parentarticlecontentid_eq);
        }
    }
	private String n_previousarticlecontentid_eq;//[上篇文章内容 ID]
	public void setN_previousarticlecontentid_eq(String n_previousarticlecontentid_eq) {
        this.n_previousarticlecontentid_eq = n_previousarticlecontentid_eq;
        if(!ObjectUtils.isEmpty(this.n_previousarticlecontentid_eq)){
            this.getSearchCond().eq("previousarticlecontentid", n_previousarticlecontentid_eq);
        }
    }
	private String n_transactioncurrencyid_eq;//[货币]
	public void setN_transactioncurrencyid_eq(String n_transactioncurrencyid_eq) {
        this.n_transactioncurrencyid_eq = n_transactioncurrencyid_eq;
        if(!ObjectUtils.isEmpty(this.n_transactioncurrencyid_eq)){
            this.getSearchCond().eq("transactioncurrencyid", n_transactioncurrencyid_eq);
        }
    }
	private String n_rootarticleid_eq;//[根文章 ID]
	public void setN_rootarticleid_eq(String n_rootarticleid_eq) {
        this.n_rootarticleid_eq = n_rootarticleid_eq;
        if(!ObjectUtils.isEmpty(this.n_rootarticleid_eq)){
            this.getSearchCond().eq("rootarticleid", n_rootarticleid_eq);
        }
    }
	private String n_subjectid_eq;//[主题]
	public void setN_subjectid_eq(String n_subjectid_eq) {
        this.n_subjectid_eq = n_subjectid_eq;
        if(!ObjectUtils.isEmpty(this.n_subjectid_eq)){
            this.getSearchCond().eq("subjectid", n_subjectid_eq);
        }
    }
	private String n_languagelocaleid_eq;//[语言]
	public void setN_languagelocaleid_eq(String n_languagelocaleid_eq) {
        this.n_languagelocaleid_eq = n_languagelocaleid_eq;
        if(!ObjectUtils.isEmpty(this.n_languagelocaleid_eq)){
            this.getSearchCond().eq("languagelocaleid", n_languagelocaleid_eq);
        }
    }

    /**
	 * 启用快速搜索
	 */
	public void setQuery(String query)
	{
		 this.query=query;
		 if(!StringUtils.isEmpty(query)){
            this.getSearchCond().and( wrapper ->
                     wrapper.like("title", query)   
            );
		 }
	}
}




