Commit 35c26ab7 by 郑江涛

feature/1004086 小优化点集合——我的礼包

parent 0afef03d
......@@ -362,7 +362,7 @@ public class GiftCouponPackageBizImpl implements GiftCouponPackageBiz {
@Override
public PageBeanNew<GiftPackageDTO> list4MyGiftPackage(Integer state,Long wechatUserId,Integer currentPage, Integer numPerPage) {
//state=1 已领取 state=2 已失效
//state=1 已领取 state=2 已失效 state=3 已使用
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("wechatUserId", wechatUserId);
paramMap.put("state", state);
......
......@@ -146,7 +146,10 @@
a.crossed_price crossedPrice,
a.exchange_address exchangeAddress,
<if test="state!=null and state==2">
if(b.use_time>0,1,2) failureState,
2 failureState,
</if>
<if test="state!=null and state==3">
1 failureState,
</if>
a.serve_id serveId,
a.serve_type serveType,
......@@ -161,7 +164,10 @@
and now() <![CDATA[ <= ]]> a.valid_date_end and use_time is null
</if>
<if test="state!=null and state==2">
and (now() > a.valid_date_end or use_time>0)
and now() > a.valid_date_end and use_time is null
</if>
<if test="state!=null and state==3">
and use_time is not null
</if>
order by b.create_time desc
</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 to comment