Commit 9e733b65 by chongli

会员档案现金券查询增加查看已使用、未使用、已过期

parent c876e2fe
......@@ -13,12 +13,38 @@
<select id="count" resultType="int">
select count(1) from bsc_voucher t
<include refid="where" />
WHERE
1 = 1
<if test="params.uid != null and params.uid != ''">
and t.uid = #{params.uid}
</if>
<if test="params.type != null and params.type == 1">
and t.used=1
</if>
<if test="params.type != null and params.type == 2">
and t.used=0 and t.endUseDate &gt; CURRENT_TIMESTAMP()
</if>
<if test="params.type != null and params.type == 3">
and t.used=0 and t.endUseDate &lt; CURRENT_TIMESTAMP()
</if>
</select>
<select id="list" resultType="Voucher">
SELECT t.Id,t.remark,t.description,t.used,t.startUseDate,t.endUseDate,t.amount from bsc_voucher t
<include refid="where" />
WHERE
1 = 1
<if test="params.uid != null and params.uid != ''">
and t.uid = #{params.uid}
</if>
<if test="params.type != null and params.type == 1">
and t.used=1
</if>
<if test="params.type != null and params.type == 2">
and t.used=0 and t.endUseDate &gt; CURRENT_TIMESTAMP()
</if>
<if test="params.type != null and params.type == 3">
and t.used=0 and t.endUseDate &lt; CURRENT_TIMESTAMP()
</if>
${params.orderBy}
limit #{offset}, #{limit}
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment