<?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.CmsEntRiskInfoCktItemMapper">
  <resultMap id="BaseResultMap" type="org.example.mybatisplus.model.auto.CmsEntRiskInfoCktItem">
    <result column="item_id" jdbcType="BIGINT" property="itemId" />
    <result column="check_id" jdbcType="BIGINT" property="checkId" />
    <result column="item_label" jdbcType="VARCHAR" property="itemLabel" />
    <result column="item_name" jdbcType="VARCHAR" property="itemName" />
    <result column="item_desc" jdbcType="VARCHAR" property="itemDesc" />
    <result column="ckt_type" jdbcType="VARCHAR" property="cktType" />
    <result column="act_val" jdbcType="VARCHAR" property="actVal" />
    <result column="logic_type" jdbcType="VARCHAR" property="logicType" />
    <result column="category_type" jdbcType="VARCHAR" property="categoryType" />
    <result column="tar_val" jdbcType="VARCHAR" property="tarVal" />
    <result column="auto_result" jdbcType="TINYINT" property="autoResult" />
    <result column="auto_msg" jdbcType="VARCHAR" property="autoMsg" />
    <result column="manual_result" jdbcType="TINYINT" property="manualResult" />
    <result column="manual_msg" jdbcType="VARCHAR" property="manualMsg" />
    <result column="score" jdbcType="BIGINT" property="score" />
    <result column="auto_score" jdbcType="BIGINT" property="autoScore" />
    <result column="manual_score" jdbcType="BIGINT" property="manualScore" />
    <result column="fine_rule" jdbcType="VARCHAR" property="fineRule" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
    <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="selectCmsEntRiskInfoCktItemVo">
        select item_id, check_id, item_label, item_name, item_desc, ckt_type, act_val, logic_type, category_type, tar_val, auto_result, auto_msg, manual_result, manual_msg, score, auto_score, manual_score, fine_rule, remarks, del_flag, created_by, modified_by, created_time, modified_time, from cms_ent_risk_info_ckt_item
   </sql>

  <select id="selectCmsEntRiskInfoCktItemList" parameterType="org.example.mybatisplus.model.auto.CmsEntRiskInfoCktItem" resultMap="BaseResultMap">
    <include refid="selectCmsEntRiskInfoCktItemVo"/>
    <where>
        <if test="itemId != null "> and item_id = #{itemId}</if>
        <if test="checkId != null "> and check_id = #{checkId}</if>
        <if test="itemLabel != null  and itemLabel != ''"> and item_label = #{itemLabel}</if>
        <if test="itemName != null  and itemName != ''"> and item_name = #{itemName}</if>
        <if test="itemDesc != null  and itemDesc != ''"> and item_desc = #{itemDesc}</if>
        <if test="cktType != null  and cktType != ''"> and ckt_type = #{cktType}</if>
        <if test="actVal != null  and actVal != ''"> and act_val = #{actVal}</if>
        <if test="logicType != null  and logicType != ''"> and logic_type = #{logicType}</if>
        <if test="categoryType != null  and categoryType != ''"> and category_type = #{categoryType}</if>
        <if test="tarVal != null  and tarVal != ''"> and tar_val = #{tarVal}</if>
        <if test="autoResult != null "> and auto_result = #{autoResult}</if>
        <if test="autoMsg != null  and autoMsg != ''"> and auto_msg = #{autoMsg}</if>
        <if test="manualResult != null "> and manual_result = #{manualResult}</if>
        <if test="manualMsg != null  and manualMsg != ''"> and manual_msg = #{manualMsg}</if>
        <if test="score != null "> and score = #{score}</if>
        <if test="autoScore != null "> and auto_score = #{autoScore}</if>
        <if test="manualScore != null "> and manual_score = #{manualScore}</if>
        <if test="fineRule != null  and fineRule != ''"> and fine_rule = #{fineRule}</if>
        <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
        <if test="delFlag != null  and delFlag != ''"> and del_flag = #{delFlag}</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>