ConditionFieldMapper.xml 3.04 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.runsa.crmapp.common.mapper.ConditionFieldMapper" >
  <resultMap id="BaseResultMap" type="cn.runsa.crmapp.common.entity.ConditionField" >
    <result column="FLD_SCOPE" property="fldScope" jdbcType="VARCHAR" />
    <result column="FLD_NAME" property="fldName" jdbcType="VARCHAR" />
    <result column="FLD_SQL" property="fldSql" jdbcType="VARCHAR" />
    <result column="VAL_TYPE" property="valType" jdbcType="VARCHAR" />
    <result column="REC_TIME" property="recTime" jdbcType="TIMESTAMP" />
    <result column="FLD_OPERATOR" property="fldOperator" jdbcType="LONGVARCHAR" />
    <result column="VAL_OPTIONS" property="valOptions" jdbcType="LONGVARCHAR" />
    <result column="VAL_VALID" property="valValid" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    `FLD_SCOPE`, `FLD_NAME`, `FLD_SQL`, `VAL_TYPE`, `REC_TIME`, `FLD_OPERATOR`, `VAL_OPTIONS`, `VAL_VALID`
  </sql>
  <insert id="insertSelective" parameterType="cn.runsa.crmapp.common.entity.ConditionField" >
    insert into crm_condition_field
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="fldScope != null" >
        `FLD_SCOPE`,
      </if>
      <if test="fldName != null" >
        `FLD_NAME`,
      </if>
      <if test="fldSql != null" >
        `FLD_SQL`,
      </if>
      <if test="valType != null" >
        `VAL_TYPE`,
      </if>
      <if test="recTime != null" >
        `REC_TIME`,
      </if>
      <if test="fldOperator != null" >
        `FLD_OPERATOR`,
      </if>
      <if test="valOptions != null" >
        `VAL_OPTIONS`,
      </if>
      <if test="valValid != null" >
        `VAL_VALID`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="fldScope != null" >
        #{fldScope,jdbcType=VARCHAR},
      </if>
      <if test="fldName != null" >
        #{fldName,jdbcType=VARCHAR},
      </if>
      <if test="fldSql != null" >
        #{fldSql,jdbcType=VARCHAR},
      </if>
      <if test="valType != null" >
        #{valType,jdbcType=VARCHAR},
      </if>
      <if test="recTime != null" >
        #{recTime,jdbcType=TIMESTAMP},
      </if>
      <if test="fldOperator != null" >
        #{fldOperator,jdbcType=LONGVARCHAR},
      </if>
      <if test="valOptions != null" >
        #{valOptions,jdbcType=LONGVARCHAR},
      </if>
      <if test="valValid != null" >
        #{valValid,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="selectListByFldScope" resultMap="BaseResultMap" parameterType="java.lang.String" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from crm_condition_field
    where `FLD_SCOPE` = #{fldScope,jdbcType=VARCHAR}
  </select>
</mapper>