<?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.CmsEntRiskInfoCktRuleMapper">
  <resultMap id="BaseResultMap" type="org.example.mybatisplus.model.auto.CmsEntRiskInfoCktRule">
    <result column="rule_id" jdbcType="BIGINT" property="ruleId" />
    <result column="rule_name" jdbcType="VARCHAR" property="ruleName" />
    <result column="rules" jdbcType="VARCHAR" property="rules" />
    <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="selectCmsEntRiskInfoCktRuleVo">
        select rule_id, rule_name, rules, tenant_id, created_by, modified_by, created_time, modified_time, from cms_ent_risk_info_ckt_rule
   </sql>

  <select id="selectCmsEntRiskInfoCktRuleList" parameterType="org.example.mybatisplus.model.auto.CmsEntRiskInfoCktRule" resultMap="BaseResultMap">
    <include refid="selectCmsEntRiskInfoCktRuleVo"/>
    <where>
        <if test="ruleId != null "> and rule_id = #{ruleId}</if>
        <if test="ruleName != null  and ruleName != ''"> and rule_name = #{ruleName}</if>
        <if test="rules != null  and rules != ''"> and rules = #{rules}</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>