| | |
| | | d.couponType as dcouponType, |
| | | e.couponType as ecouponType, |
| | | DATE_FORMAT(a.startTime, '%Y-%m-%d') as startTime, |
| | | DATE_FORMAT(a.endTime, '%Y-%m-%-d') as endTime, |
| | | DATE_FORMAT(a.endTime, '%Y-%m-%d') as endTime, |
| | | a.effective as beffective, |
| | | a.effective as ceffective, |
| | | a.effective as deffective, |
| | |
| | | left join t_sys_coupon_record e on (a.intercityCouponId = e.id) |
| | | left join t_user_activity f on (a.userActivityId = f.id) |
| | | where a.`enable` = 2 and f.status = 3 and now() between a.startTime and a.endTime and a.money <= #{money} |
| | | and b.companyId = #{companyId} and c.companyId = #{companyId} and d.companyId = #{companyId} and e.companyId = #{companyId} |
| | | and (b.companyId = #{companyId} or c.companyId = #{companyId} or d.companyId = #{companyId} or e.companyId = #{companyId}) |
| | | </select> |
| | | </mapper> |