VpMaterialDescriptionMapper.xml 1.7 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.weapp.mapper.VpMaterialDescriptionMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.weapp.model.VpMaterialDescription" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="material_id" property="materialId" jdbcType="INTEGER" />
    <result column="type" property="type" jdbcType="TINYINT" />
    <result column="content" property="content" jdbcType="VARCHAR" />
    <result column="sort" property="sort" jdbcType="SMALLINT" />
    <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>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, material_id, type, content, sort, created_by, created_date, updated_by, updated_date, 
    deleted_flag
  </sql>
  
  <select id="list" parameterType="cn.com.glsx.dj.weapp.model.VpMaterialDescription" resultMap="BaseResultMap">
  	select <include refid="Base_Column_List"/> from dj_weapp_video_plus_material_description
  	<where>
  		deleted_flag = 'N'
  		<if test="materialId != null">
  			and material_id = #{materialId}
  		</if>
  		<if test="type != null">
  			and type = #{type}
  		</if>
  	</where>
  	order by sort asc
  </select>
</mapper>