| | |
| | | * @param seconds |
| | | * @return |
| | | */ |
| | | List<UserSystemCouponRecord> getCouponByUsingTimeOut(@Param("uid") Long uid,@Param("seconds") long seconds); |
| | | List<UserSystemCouponRecord> getCouponByUsingTimeOut(@Param("uid") Long uid, @Param("number") Long number); |
| | | |
| | | } |
| | |
| | | SELECT * FROM `yeshi_ec_user_system_coupon` cp |
| | | LEFT JOIN `yeshi_ec_user_system_coupon_record` rd ON rd.`ucr_user_coupon_id` = cp.`usc_id` |
| | | WHERE cp.`usc_uid` = #{uid} AND cp.`usc_state` = 2 AND rd.`ucr_state` = 0 |
| | | <![CDATA[ AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(cp.`usc_use_time`) > #{seconds} ]]> |
| | | AND (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(cp.`usc_use_time`)) <![CDATA[>]]> #{number}; |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<UserSystemCouponRecord> getCouponByUsingTimeOut(Long uid, long seconds) {
|
| | | public List<UserSystemCouponRecord> getCouponByUsingTimeOut(Long uid, Long seconds) {
|
| | | return userSystemCouponRecordMapper.getCouponByUsingTimeOut(uid, seconds);
|
| | | }
|
| | |
|
| | |
| | | @Override
|
| | | public void sendBackTimeOutCoupon(Long uid) {
|
| | | // 超过120秒 未被匹配的券
|
| | | List<UserSystemCouponRecord> list = userSystemCouponRecordService.getCouponByUsingTimeOut(uid, 120);
|
| | | List<UserSystemCouponRecord> list = userSystemCouponRecordService.getCouponByUsingTimeOut(uid, 120L);
|
| | | if (list == null || list.size() == 0) {
|
| | | return;
|
| | | }
|
| | |
| | | * @param seconds
|
| | | * @return
|
| | | */
|
| | | public List<UserSystemCouponRecord> getCouponByUsingTimeOut(Long uid, long seconds);
|
| | | public List<UserSystemCouponRecord> getCouponByUsingTimeOut(Long uid, Long seconds);
|
| | |
|
| | | /**
|
| | | * 查询状态
|