LineMapper.xml 1.62 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.yoho.search.dal.LineMapper" >
  <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.Line" >
    <result column="id" property="id" jdbcType="INTEGER" />
    <result column="title" property="title" jdbcType="VARCHAR" />
    <result column="title_tc" property="titleTc" jdbcType="VARCHAR" />
    <result column="is_top" property="isTop" jdbcType="INTEGER" />
    <result column="top_time" property="topTime" jdbcType="INTEGER" />
    <result column="publish_time" property="publishTime" jdbcType="INTEGER" />
    <result column="is_recommend" property="isRecommend" jdbcType="INTEGER" />
    <result column="sort" property="sort" jdbcType="INTEGER" />
    <result column="recommend_time" property="recommendTime" jdbcType="INTEGER" />
    <result column="city_id" property="cityId" jdbcType="VARCHAR" />
    <result column="description" property="description" jdbcType="VARCHAR" />
    <result column="description_tc" property="descriptionTc" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
      id, title, title_tc,
      is_top, top_time, publish_time,
      is_recommend, sort, recommend_time,
      city_id, description, description_tc
  </sql>
  <select id="selectPageList" resultMap="BaseResultMap" timeout="20000">
    select
    <include refid="Base_Column_List" />
    from line limit #{offset},#{pageSize}
  </select>
  <select id="selectCount" resultType="java.lang.Integer" timeout="20000">
    SELECT count(*) FROM line
  </select>
</mapper>