ActivityAmountConditionMapper.xml
1.1 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.yohoufo.dal.promotion.IActivityAmountConditionMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.promotion.model.ActivityAmountCondition">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="activity_id" property="activityId" jdbcType="INTEGER"/>
<result column="limit_amount" property="limitAmount" jdbcType="INTEGER"/>
<result column="offer_amount" property="offerAmount" jdbcType="DECIMAL"/>
<result column="offer_max_limit" property="offerMaxLimit" jdbcType="INTEGER"/>
<result column="create_time" property="createTime" jdbcType="INTEGER"/>
</resultMap>
<select id="selectByActivityId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select limit_amount, offer_amount, offer_max_limit , create_time
from promotion_amount_condition
where activity_id = #{activityId, jdbcType=INTEGER}
limit 1
</select>
</mapper>