<?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.CmsEntRiskQxbInfoRelMapper">
  <resultMap id="BaseResultMap" type="org.example.mybatisplus.model.auto.CmsEntRiskQxbInfoRel">
    <result column="rel_id" jdbcType="BIGINT" property="relId" />
    <result column="info_id" jdbcType="BIGINT" property="infoId" />
    <result column="ent_type" jdbcType="CHAR" property="entType" />
    <result column="base_info" jdbcType="VARCHAR" property="baseInfo" />
    <result column="report_list_info" jdbcType="VARCHAR" property="reportListInfo" />
    <result column="taxpayer_list_info" jdbcType="VARCHAR" property="taxpayerListInfo" />
    <result column="social_security_info" jdbcType="VARCHAR" property="socialSecurityInfo" />
    <result column="admin_punish_info" jdbcType="VARCHAR" property="adminPunishInfo" />
    <result column="abnormals_info" jdbcType="VARCHAR" property="abnormalsInfo" />
    <result column="tax_case_info" jdbcType="VARCHAR" property="taxCaseInfo" />
    <result column="serious_illegal_info" jdbcType="VARCHAR" property="seriousIllegalInfo" />
    <result column="employees_info" jdbcType="VARCHAR" property="employeesInfo" />
    <result column="execution_list_info" jdbcType="VARCHAR" property="executionListInfo" />
    <result column="credit_grade_info" jdbcType="VARCHAR" property="creditGradeInfo" />
    <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
    <result column="init_flag" jdbcType="TINYINT" property="initFlag" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <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" />
    <result column="process_state" jdbcType="INTEGER" property="processState" />
    <result column="is_redo" jdbcType="TINYINT" property="isRedo" />
  </resultMap>

  <sql id="selectCmsEntRiskQxbInfoRelVo">
        select rel_id, info_id, ent_type, base_info, report_list_info, taxpayer_list_info, social_security_info, admin_punish_info, abnormals_info, tax_case_info, serious_illegal_info, employees_info, execution_list_info, credit_grade_info, del_flag, init_flag, remarks, tenant_id, created_by, modified_by, created_time, modified_time, process_state, is_redo, from cms_ent_risk_qxb_info_rel
   </sql>

  <select id="selectCmsEntRiskQxbInfoRelList" parameterType="org.example.mybatisplus.model.auto.CmsEntRiskQxbInfoRel" resultMap="BaseResultMap">
    <include refid="selectCmsEntRiskQxbInfoRelVo"/>
    <where>
        <if test="relId != null "> and rel_id = #{relId}</if>
        <if test="infoId != null "> and info_id = #{infoId}</if>
        <if test="entType != null "> and ent_type = #{entType}</if>
        <if test="baseInfo != null  and baseInfo != ''"> and base_info = #{baseInfo}</if>
        <if test="reportListInfo != null  and reportListInfo != ''"> and report_list_info = #{reportListInfo}</if>
        <if test="taxpayerListInfo != null  and taxpayerListInfo != ''"> and taxpayer_list_info = #{taxpayerListInfo}</if>
        <if test="socialSecurityInfo != null  and socialSecurityInfo != ''"> and social_security_info = #{socialSecurityInfo}</if>
        <if test="adminPunishInfo != null  and adminPunishInfo != ''"> and admin_punish_info = #{adminPunishInfo}</if>
        <if test="abnormalsInfo != null  and abnormalsInfo != ''"> and abnormals_info = #{abnormalsInfo}</if>
        <if test="taxCaseInfo != null  and taxCaseInfo != ''"> and tax_case_info = #{taxCaseInfo}</if>
        <if test="seriousIllegalInfo != null  and seriousIllegalInfo != ''"> and serious_illegal_info = #{seriousIllegalInfo}</if>
        <if test="employeesInfo != null  and employeesInfo != ''"> and employees_info = #{employeesInfo}</if>
        <if test="executionListInfo != null  and executionListInfo != ''"> and execution_list_info = #{executionListInfo}</if>
        <if test="creditGradeInfo != null  and creditGradeInfo != ''"> and credit_grade_info = #{creditGradeInfo}</if>
        <if test="delFlag != null  and delFlag != ''"> and del_flag = #{delFlag}</if>
        <if test="initFlag != null "> and init_flag = #{initFlag}</if>
        <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</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>
        <if test="processState != null "> and process_state = #{processState}</if>
        <if test="isRedo != null "> and is_redo = #{isRedo}</if>
    </where>
  </select>
</mapper>