| | |
| | | |
| | | public interface UserSystemCouponMapper extends BaseMapper<UserSystemCoupon> { |
| | | |
| | | /** |
| | | * 激活券 |
| | | * @param couponId |
| | | */ |
| | | void activateCouponByType(@Param("uid") Long uid, @Param("couponId") Long couponId); |
| | | |
| | | List<UserSystemCoupon> getUserCouponList(@Param("start") long start, @Param("count") int count, |
| | | @Param("uid") Long uid); |
| | | |
| | | |
| | | List<UserSystemCouponVO> getCouponListOld(@Param("start") long start, @Param("count") int count, |
| | | @Param("uid") Long uid); |
| | | |
| | | long countCouponOld(@Param("uid") Long uid); |
| | | |
| | | |
| | | List<UserSystemCouponVO> getUserCouponVOList(@Param("start") long start, @Param("count") int count, |
| | | @Param("uid") Long uid); |
| | |
| | | List<UserSystemCoupon> getUserCouponBySource(@Param("uid") Long uid, @Param("source") String source); |
| | | |
| | | /** |
| | | * 根据来源查询订单 |
| | | * @param uid |
| | | * @param source |
| | | * @return |
| | | */ |
| | | int countTodatyUserCouponBySource(@Param("uid") Long uid, @Param("source") String source); |
| | | |
| | | /** |
| | | * 获取已经过期但状态未改变的券 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | List<UserSystemCoupon> getCounponNowInvalid(@Param("uid") Long uid); |
| | | List<UserSystemCoupon> getCounponNowInvalid(@Param("count")int count); |
| | | |
| | | /** |
| | | * 获取已经过期但状态未改变的券 |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | List<UserSystemCoupon> getCounponNowInvalidByUid(@Param("uid")Long uid); |
| | | |
| | | /** |
| | | * 根据状态查询券 |
| | |
| | | */ |
| | | List<UserSystemCoupon> getCouponByState(@Param("uid") Long uid, @Param("state") String state); |
| | | |
| | | /** |
| | | * 查询没有激活的券 |
| | | * @param couponId |
| | | */ |
| | | List<UserSystemCoupon> getCouponByTypeAndNotActivated(@Param("uid") Long uid, @Param("couponId") Long couponId); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据类型查询有效券 |
| | | * @param uid |
| | | * @param source |
| | | * @return |
| | | */ |
| | | List<UserSystemCouponVO> getValidByUidAndType(@Param("uid") Long uid, @Param("type") String type); |
| | | |
| | | |
| | | /** |
| | | * 查询正在使用中 超过时间仍未匹配到订单记录 |
| | | * @param uid |
| | | * @param seconds |
| | | * @return |
| | | */ |
| | | List<UserSystemCoupon> getCouponByUsingTimeOut(@Param("uid") Long uid,@Param("list") List<Long> list, @Param("number") Long number); |
| | | |
| | | |
| | | /** |
| | | * 统计有效券 |
| | | * @param uid |
| | | * @param listCouponId |
| | | * @return |
| | | */ |
| | | long countUsableByUid(@Param("uid") Long uid, @Param("list") List<Long> listCouponId); |
| | | |
| | | |
| | | /** |
| | | * 查询免券 |
| | | * @param uid |
| | | * @param source |
| | | * @return |
| | | */ |
| | | List<UserSystemCoupon> getFreeCouponByType(@Param("uid") Long uid, @Param("type") String type); |
| | | |
| | | |
| | | /** |
| | | * 查询需要激活的免券 |
| | | * @param uid |
| | | * @param source |
| | | * @return |
| | | */ |
| | | UserSystemCoupon getNeedActivateCouponByType(@Param("uid") Long uid, @Param("type") String type); |
| | | |
| | | } |