PointMapper.xml 2.42 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.PointMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.Point" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="first_classify" property="firstClassify" jdbcType="VARCHAR" />
    <result column="first_weight" property="firstWeight" jdbcType="INTEGER" />
    <result column="second_classify" property="secondClassify" jdbcType="VARCHAR" />
    <result column="second_weight" property="secondWeight" jdbcType="INTEGER" />
    <result column="agi_second_classify" property="agiSecondClassify" jdbcType="VARCHAR" />
    <result column="content" property="content" jdbcType="VARCHAR" />
    <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
    <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
    <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
    <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
    <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
  </resultMap>
  <resultMap id="pDtoResult" type="cn.com.glsx.dj.mindworkplate.dto.ConversationPointDTO" extends="BaseResultMap">
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, first_classify, first_weight, second_classify, second_weight, agi_second_classify, content, created_by,
    created_date, updated_by, updated_date, deleted_flag
  </sql>

  <select id="page"
          parameterType="cn.com.glsx.dj.mindworkplate.dto.ConversationPointRequestDTO"
          resultMap="pDtoResult">
    select * from inspection_point p
    <where>
      p.deleted_flag = 'N'
      <if test="firstClassify != null and firstClassify != ''">
        and p.first_classify = #{firstClassify}
      </if>
      <if test="secondClassify != null and secondClassify != ''">
        and p.second_classify = #{secondClassify}
      </if>
      <if test="content != null and content != ''">
        and p.content like concat ('%', #{content}, '%')
      </if>
    </where>
  </select>

  <select id="selectPointList" resultMap="BaseResultMap">
    select <include refid="Base_Column_List"/>
    from inspection_point
    where deleted_flag = 'N'
  </select>
</mapper>