SysOpAdviceRelSMapper.xml 3.34 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="com.zteits.sys.mapper.smapper.SysOpAdviceRelSMapper">
  <resultMap id="BaseResultMap" type="com.zteits.sys.domain.SysOpAdviceRel">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="op_id" jdbcType="BIGINT" property="opId" />
    <result column="advice_type" jdbcType="INTEGER" property="adviceType" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, op_id, advice_type, data_state, create_empid, create_date, modfiy_empid, modfiy_date, 
    remark
  </sql>

</mapper>