<?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.stylefeng.guns.modular.system.dao.CouponMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.Coupon">
|
<id column="id" property="id" />
|
<result column="couponName" property="couponName" />
|
<result column="timeType" property="timeType" />
|
<result column="grantType" property="grantType" />
|
<result column="startTime" property="startTime" />
|
<result column="endTime" property="endTime" />
|
<result column="afterDay" property="afterDay" />
|
<result column="needClockIn" property="needClockIn" />
|
<result column="buyCourseId" property="buyCourseId" />
|
<result column="money" property="money" />
|
<result column="reduction" property="reduction" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, couponName, timeType, grantType, startTime, endTime, afterDay, needClockIn, buyCourseId, money, reduction
|
</sql>
|
<select id="getList" resultType="com.stylefeng.guns.modular.system.model.CouponReceive">
|
select t1.* from t_coupon_receive t1
|
where t1.userId = #{req.userId}
|
|
<if test="req.type == 2">
|
and t1.state = 2
|
</if>
|
<if test="req.type == 3">
|
and t1.state = 1
|
</if>
|
<if test="req.type == 4">
|
and t1.state = 3
|
</if>
|
limit #{req.pageNum}, #{req.pageSize}
|
</select>
|
</mapper>
|