StoreMapper.xml 2.47 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.StoreMapper">
    <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.Store">
        <result column="id" property="id" jdbcType="INTEGER"/>
        <result column="store_name" property="storeName" jdbcType="VARCHAR"/>
        <result column="store_english_name" property="storeEnglishName" jdbcType="VARCHAR"/>
        <result column="store_name_tc" property="storeNameTc" jdbcType="VARCHAR"/>
        <result column="latitude" property="latitude" jdbcType="DOUBLE"/>
        <result column="city_id" property="cityId" jdbcType="INTEGER"/>
        <result column="tags" property="tags" jdbcType="INTEGER"/>
        <result column="longitude" property="longitude" jdbcType="DOUBLE"/>
        <result column="biz_id" property="bizId" jdbcType="INTEGER"/>
        <result column="order_by" property="orderBy" jdbcType="INTEGER"/>
        <result column="consumption" property="consumption" jdbcType="INTEGER"/>
        <result column="score" property="score" jdbcType="INTEGER"/>
        <result column="assessment_num" property="assessmentNum" jdbcType="INTEGER"/>
        <result column="is_recommend" property="isRecommend" jdbcType="INTEGER"/>
        <result column="recommend_time" property="recommendTime" jdbcType="INTEGER"/>
        <result column="sort" property="sort" jdbcType="INTEGER"/>
        <result column="is_shield" property="isShield" jdbcType="INTEGER"/>
        <result column="create_time" property="createTime" jdbcType="INTEGER"/>
        <result column="store_first" property="storeFirst" jdbcType="VARCHAR"/>
        <result column="address_full" property="addressFull" jdbcType="VARCHAR"/>
        <result column="des" property="des" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
      id, store_name, store_english_name,
      store_name_tc, latitude, city_id,
      tags, longitude, biz_id,
      order_by, consumption, score,
      assessment_num, is_recommend, recommend_time,
      sort,is_shield, store_first, des,address_full, create_time
  </sql>
    <select id="selectPageList" resultMap="BaseResultMap" timeout="20000">
        select
        <include refid="Base_Column_List"/>
        from store limit #{offset},#{pageSize}
    </select>
    <select id="selectCount" resultType="java.lang.Integer" timeout="20000">
    SELECT count(*) FROM store
  </select>
</mapper>