<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.example.mybatisplus.mapper.auto.CmsEntRiskFinancialTaxMapper">
  <resultMap id="BaseResultMap" type="org.example.mybatisplus.model.auto.CmsEntRiskFinancialTax">
    <result column="tax_id" jdbcType="BIGINT" property="taxId" />
    <result column="ent_risk_info_id" jdbcType="BIGINT" property="entRiskInfoId" />
    <result column="ent_name" jdbcType="VARCHAR" property="entName" />
    <result column="reg_code" jdbcType="VARCHAR" property="regCode" />
    <result column="same_invoice_address" jdbcType="VARCHAR" property="sameInvoiceAddress" />
    <result column="abnormal_business" jdbcType="VARCHAR" property="abnormalBusiness" />
    <result column="invoice_with_same_industry" jdbcType="VARCHAR" property="invoiceWithSameIndustry" />
    <result column="invoice_with_same_ent" jdbcType="VARCHAR" property="invoiceWithSameEnt" />
    <result column="less_people_hign_invoice" jdbcType="VARCHAR" property="lessPeopleHignInvoice" />
    <result column="tax_arrears" jdbcType="VARCHAR" property="taxArrears" />
    <result column="tax_audits" jdbcType="VARCHAR" property="taxAudits" />
    <result column="tax_violations" jdbcType="VARCHAR" property="taxViolations" />
    <result column="tax_risks" jdbcType="VARCHAR" property="taxRisks" />
    <result column="tax_analysis_basic" jdbcType="VARCHAR" property="taxAnalysisBasic" />
    <result column="balance_sheet_year" jdbcType="VARCHAR" property="balanceSheetYear" />
    <result column="income_statement_year" jdbcType="VARCHAR" property="incomeStatementYear" />
    <result column="del_flag" jdbcType="CHAR" property="delFlag" />
    <result column="init_flag" jdbcType="TINYINT" property="initFlag" />
    <result column="init_time" jdbcType="TIMESTAMP" property="initTime" />
    <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
    <result column="modified_by" jdbcType="VARCHAR" property="modifiedBy" />
    <result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
    <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime" />
  </resultMap>

  <sql id="selectCmsEntRiskFinancialTaxVo">
        select tax_id, ent_risk_info_id, ent_name, reg_code, same_invoice_address, abnormal_business, invoice_with_same_industry, invoice_with_same_ent, less_people_hign_invoice, tax_arrears, tax_audits, tax_violations, tax_risks, tax_analysis_basic, balance_sheet_year, income_statement_year, del_flag, init_flag, init_time, tenant_id, created_by, modified_by, created_time, modified_time, from cms_ent_risk_financial_tax
   </sql>

  <select id="selectCmsEntRiskFinancialTaxList" parameterType="org.example.mybatisplus.model.auto.CmsEntRiskFinancialTax" resultMap="BaseResultMap">
    <include refid="selectCmsEntRiskFinancialTaxVo"/>
    <where>
        <if test="taxId != null "> and tax_id = #{taxId}</if>
        <if test="entRiskInfoId != null "> and ent_risk_info_id = #{entRiskInfoId}</if>
        <if test="entName != null  and entName != ''"> and ent_name = #{entName}</if>
        <if test="regCode != null  and regCode != ''"> and reg_code = #{regCode}</if>
        <if test="sameInvoiceAddress != null  and sameInvoiceAddress != ''"> and same_invoice_address = #{sameInvoiceAddress}</if>
        <if test="abnormalBusiness != null  and abnormalBusiness != ''"> and abnormal_business = #{abnormalBusiness}</if>
        <if test="invoiceWithSameIndustry != null  and invoiceWithSameIndustry != ''"> and invoice_with_same_industry = #{invoiceWithSameIndustry}</if>
        <if test="invoiceWithSameEnt != null  and invoiceWithSameEnt != ''"> and invoice_with_same_ent = #{invoiceWithSameEnt}</if>
        <if test="lessPeopleHignInvoice != null  and lessPeopleHignInvoice != ''"> and less_people_hign_invoice = #{lessPeopleHignInvoice}</if>
        <if test="taxArrears != null  and taxArrears != ''"> and tax_arrears = #{taxArrears}</if>
        <if test="taxAudits != null  and taxAudits != ''"> and tax_audits = #{taxAudits}</if>
        <if test="taxViolations != null  and taxViolations != ''"> and tax_violations = #{taxViolations}</if>
        <if test="taxRisks != null  and taxRisks != ''"> and tax_risks = #{taxRisks}</if>
        <if test="taxAnalysisBasic != null  and taxAnalysisBasic != ''"> and tax_analysis_basic = #{taxAnalysisBasic}</if>
        <if test="balanceSheetYear != null  and balanceSheetYear != ''"> and balance_sheet_year = #{balanceSheetYear}</if>
        <if test="incomeStatementYear != null  and incomeStatementYear != ''"> and income_statement_year = #{incomeStatementYear}</if>
        <if test="delFlag != null "> and del_flag = #{delFlag}</if>
        <if test="initFlag != null "> and init_flag = #{initFlag}</if>
        <if test="initTime != null "> and init_time = #{initTime}</if>
        <if test="tenantId != null "> and tenant_id = #{tenantId}</if>
        <if test="createdBy != null  and createdBy != ''"> and created_by = #{createdBy}</if>
        <if test="modifiedBy != null  and modifiedBy != ''"> and modified_by = #{modifiedBy}</if>
        <if test="createdTime != null "> and created_time = #{createdTime}</if>
        <if test="modifiedTime != null "> and modified_time = #{modifiedTime}</if>
    </where>
  </select>
</mapper>