<?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.CmsEntRiskInfoCktMapper">
  <resultMap id="BaseResultMap" type="org.example.mybatisplus.model.auto.CmsEntRiskInfoCkt">
    <result column="ckt_id" jdbcType="BIGINT" property="cktId" />
    <result column="rel_id" jdbcType="BIGINT" property="relId" />
    <result column="ckt_state" jdbcType="VARCHAR" property="cktState" />
    <result column="check_time" jdbcType="TIMESTAMP" property="checkTime" />
    <result column="refresh_time" jdbcType="TIMESTAMP" property="refreshTime" />
    <result column="report_url" jdbcType="VARCHAR" property="reportUrl" />
    <result column="signed_by" jdbcType="VARCHAR" property="signedBy" />
    <result column="advice" jdbcType="VARCHAR" property="advice" />
    <result column="review" jdbcType="VARCHAR" property="review" />
    <result column="standard_id" jdbcType="BIGINT" property="standardId" />
    <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="selectCmsEntRiskInfoCktVo">
        select ckt_id, rel_id, ckt_state, check_time, refresh_time, report_url, signed_by, advice, review, standard_id, remarks, del_flag, tenant_id, created_by, modified_by, created_time, modified_time, from cms_ent_risk_info_ckt
   </sql>

  <select id="selectCmsEntRiskInfoCktList" parameterType="org.example.mybatisplus.model.auto.CmsEntRiskInfoCkt" resultMap="BaseResultMap">
    <include refid="selectCmsEntRiskInfoCktVo"/>
    <where>
        <if test="cktId != null "> and ckt_id = #{cktId}</if>
        <if test="relId != null "> and rel_id = #{relId}</if>
        <if test="cktState != null  and cktState != ''"> and ckt_state = #{cktState}</if>
        <if test="checkTime != null "> and check_time = #{checkTime}</if>
        <if test="refreshTime != null "> and refresh_time = #{refreshTime}</if>
        <if test="reportUrl != null  and reportUrl != ''"> and report_url = #{reportUrl}</if>
        <if test="signedBy != null  and signedBy != ''"> and signed_by = #{signedBy}</if>
        <if test="advice != null  and advice != ''"> and advice = #{advice}</if>
        <if test="review != null  and review != ''"> and review = #{review}</if>
        <if test="standardId != null "> and standard_id = #{standardId}</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>