<?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.CmsEntRiskFinancialTaxAuthMapper">
  <resultMap id="BaseResultMap" type="org.example.mybatisplus.model.auto.CmsEntRiskFinancialTaxAuth">
    <result column="auth_id" jdbcType="BIGINT" property="authId" />
    <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="auth_url" jdbcType="VARCHAR" property="authUrl" />
    <result column="auth_state" jdbcType="VARCHAR" property="authState" />
    <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" />
    <result column="auth_order_no" jdbcType="VARCHAR" property="authOrderNo" />
    <result column="tax_no" jdbcType="VARCHAR" property="taxNo" />
    <result column="email" jdbcType="VARCHAR" property="email" />
    <result column="email_notify_time" jdbcType="TIMESTAMP" property="emailNotifyTime" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
    <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="selectCmsEntRiskFinancialTaxAuthVo">
        select auth_id, ent_risk_info_id, ent_name, reg_code, auth_url, auth_state, auth_time, auth_order_no, tax_no, email, email_notify_time, remarks, del_flag, tenant_id, created_by, modified_by, created_time, modified_time, from cms_ent_risk_financial_tax_auth
   </sql>

  <select id="selectCmsEntRiskFinancialTaxAuthList" parameterType="org.example.mybatisplus.model.auto.CmsEntRiskFinancialTaxAuth" resultMap="BaseResultMap">
    <include refid="selectCmsEntRiskFinancialTaxAuthVo"/>
    <where>
        <if test="authId != null "> and auth_id = #{authId}</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="authUrl != null  and authUrl != ''"> and auth_url = #{authUrl}</if>
        <if test="authState != null  and authState != ''"> and auth_state = #{authState}</if>
        <if test="authTime != null "> and auth_time = #{authTime}</if>
        <if test="authOrderNo != null  and authOrderNo != ''"> and auth_order_no = #{authOrderNo}</if>
        <if test="taxNo != null  and taxNo != ''"> and tax_no = #{taxNo}</if>
        <if test="email != null  and email != ''"> and email = #{email}</if>
        <if test="emailNotifyTime != null "> and email_notify_time = #{emailNotifyTime}</if>
        <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
        <if test="delFlag != null  and delFlag != ''"> and del_flag = #{delFlag}</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>