EarlyWarningRuleConditionMapper.xml 2.18 KB
<?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="cn.com.glsx.dj.mindworkplate.mapper.EarlyWarningRuleConditionMapper">
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.EarlyWarningRuleCondition">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="field_name" jdbcType="VARCHAR" property="fieldName" />
    <result column="operator" jdbcType="VARCHAR" property="operator" />
    <result column="value_type" jdbcType="TINYINT" property="valueType" />
    <result column="logical_relation" jdbcType="VARCHAR" property="logicalRelation" />
    <result column="time_window" jdbcType="INTEGER" property="timeWindow" />
    <result column="rule_id" jdbcType="INTEGER" property="ruleId" />
    <result column="time_unit" jdbcType="VARCHAR" property="timeUnit" />
    <result column="continuous_days" jdbcType="INTEGER" property="continuousDays" />
    <result column="dynamic_time_range_type" jdbcType="VARCHAR" property="dynamicTimeRangeType" />
    <result column="dynamic_time_range_value" jdbcType="INTEGER" property="dynamicTimeRangeValue" />
    <result column="value_text" jdbcType="LONGVARCHAR" property="valueText" />
    <result column="custom_time_expression" jdbcType="LONGVARCHAR" property="customTimeExpression" />
    <result column="field_value_type" jdbcType="INTEGER" property="fieldValueType" />
    <result column="brand_param" jdbcType="VARCHAR" property="brandParam" />
    <result column="staff_field_name" jdbcType="VARCHAR" property="staffFieldName" />
  </resultMap>

  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, field_name, operator, value_type, logical_relation, time_window, rule_id, time_unit, 
    continuous_days, dynamic_time_range_type, dynamic_time_range_value,value_text,custom_time_expression,field_value_type,brand_param,staff_field_name
  </sql>




  <select id="findByRuleId" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from early_warning_rule_condition
    where rule_id = #{ruleId}
  </select>
</mapper>