CutDownPriceActivityMapper.xml
1.64 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.activity.dal.CutDownPriceActivityMapper">
<resultMap id="BaseResultMap" type="com.yoho.activity.dal.model.CutDownPriceActivity">
<id column="activity_id" jdbcType="INTEGER" property="activityId" />
<result column="activity_name" property="activityName" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="begin_time" property="beginTime" jdbcType="INTEGER" />
<result column="end_time" property="endTime" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
<result column="jump_url" property="jumpUrl" jdbcType="VARCHAR" />
<result column="banner_url" property="banner" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
activity_id, activity_name, status, begin_time, end_time, create_time, update_time, jump_url, banner_url
</sql>
<select id="selectCutDownPriceActivity" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from cutdown_price_activity
where activity_id = #{activityId,jdbcType=INTEGER}
</select>
<select id="selectCutDownPriceActivityList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM cutdown_price_activity
where activity_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>