|
@@ -493,7 +493,7 @@
|
|
|
</if>
|
|
|
<if test="userId >0">
|
|
|
if(#{registerTime} <![CDATA[ > ]]> startDate,#{registerTime},startDate) as startDate,
|
|
|
- if(receiveFlag=1,endDate,date_add(if(#{registerTime} <![CDATA[ > ]]> startDate and #{registerTime}
|
|
|
+ if(useTimeFlag=1 or receiveFlag=1,endDate,date_add(if(#{registerTime} <![CDATA[ > ]]> startDate and #{registerTime}
|
|
|
<![CDATA[ < ]]> endDate,#{registerTime},startDate),interval receivePeriod day)) as endDate,
|
|
|
</if>
|
|
|
couponType,
|
|
@@ -531,7 +531,7 @@
|
|
|
cc.moneyCouponPrice,
|
|
|
cc.moneyCouponType,
|
|
|
if(cc.vipFlag = 1, cc.startDate, a.createDate) as startDate,
|
|
|
- if(cc.vipFlag = 1, cc.endDate, date_add(a.createDate, interval cc.usePeriod day)) as endDate,
|
|
|
+ if(cc.useTimeFlag = 1 or cc.vipFlag = 1, cc.endDate, date_add(a.createDate, interval cc.usePeriod day)) as endDate,
|
|
|
cc.couponType,
|
|
|
cc.userId,
|
|
|
cc.shopId,
|