...
|
...
|
@@ -21,23 +21,28 @@ |
|
|
</sql>
|
|
|
<select id="selectByCondition" resultType="com.yoho.ufo.model.coupon.UserCoupon">
|
|
|
select <include refid="Base_Column_List"/> from user_coupon
|
|
|
where 1=1
|
|
|
<if test="param.couponId != null">
|
|
|
and coupon_Id=#{param.couponId}
|
|
|
</if>
|
|
|
<if test="param.couponCode != null">
|
|
|
and coupon_code=#{param.couponCode}
|
|
|
</if>
|
|
|
<if test="param.uid != null">
|
|
|
and uid=#{param.uid}
|
|
|
</if>
|
|
|
<if test="param.status != null">
|
|
|
and status=#{param.status}
|
|
|
</if>
|
|
|
order by id desc
|
|
|
<if test="param.size > 0">
|
|
|
limit #{param.start},#{param.size}
|
|
|
</if>
|
|
|
inner join (
|
|
|
select id from user_coupon
|
|
|
<where>
|
|
|
<if test="param.couponId != null">
|
|
|
and coupon_Id=#{param.couponId}
|
|
|
</if>
|
|
|
<if test="param.couponCode != null">
|
|
|
and coupon_code=#{param.couponCode}
|
|
|
</if>
|
|
|
<if test="param.uid != null">
|
|
|
and uid=#{param.uid}
|
|
|
</if>
|
|
|
<if test="param.status != null">
|
|
|
and status=#{param.status}
|
|
|
</if>
|
|
|
</where>
|
|
|
order by id desc
|
|
|
<if test="param.size > 0">
|
|
|
limit #{param.start},#{param.size}
|
|
|
</if>
|
|
|
)
|
|
|
a using(id)
|
|
|
</select>
|
|
|
<select id="selectTotalByCondition" resultType="java.lang.Integer">
|
|
|
select count(1) from user_coupon
|
...
|
...
|
|