CommentMapper.xml
1.58 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.CommentMapper" >
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.Comment" >
<result column="id" property="id" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="user_auth" property="userAuth" jdbcType="INTEGER" />
<result column="city_id" property="cityId" jdbcType="INTEGER" />
<result column="user_type" property="userType" jdbcType="INTEGER" />
<result column="store_id" property="storeId" jdbcType="INTEGER" />
<result column="bizid" property="bizId" jdbcType="INTEGER" />
<result column="publish_time" property="publishTime" jdbcType="INTEGER" />
<result column="is_top" property="isTop" jdbcType="INTEGER" />
<result column="top_time" property="topTime" jdbcType="INTEGER" />
<result column="is_deleted" property="isDeleted" jdbcType="INTEGER" />
<result column="description" property="description" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, uid, user_auth,
city_id, user_type, store_id,
bizid, publish_time, is_top,
top_time, is_deleted, description
</sql>
<select id="getPageLists" resultMap="BaseResultMap" timeout="20000">
select
<include refid="Base_Column_List" />
from comment limit #{offset},#{pageSize}
</select>
<select id="count" resultType="java.lang.Integer" timeout="20000">
SELECT count(*) FROM comment
</select>
</mapper>