UserCouponService.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. package com.fuint.common.service;
  2. import com.baomidou.mybatisplus.extension.service.IService;
  3. import com.fuint.common.dto.CouponDto;
  4. import com.fuint.common.param.CouponReceiveParam;
  5. import com.fuint.framework.exception.BusinessCheckException;
  6. import com.fuint.framework.pagination.PaginationRequest;
  7. import com.fuint.framework.pagination.PaginationResponse;
  8. import com.fuint.framework.web.ResponseObject;
  9. import com.fuint.repository.model.MtUserCoupon;
  10. import java.util.List;
  11. import java.util.Map;
  12. /**
  13. * 会员卡券业务接口
  14. *
  15. * Created by FSQ
  16. * CopyRight https://www.fuint.cn
  17. */
  18. public interface UserCouponService extends IService<MtUserCoupon> {
  19. /**
  20. * 分页查询列表
  21. *
  22. * @param paginationRequest
  23. * @return
  24. */
  25. PaginationResponse<MtUserCoupon> queryUserCouponListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;
  26. /**
  27. * 领取卡券
  28. *
  29. * @param couponReceiveParam
  30. * @return
  31. * */
  32. boolean receiveCoupon(CouponReceiveParam couponReceiveParam) throws BusinessCheckException;
  33. /**
  34. * 预存卡券
  35. *
  36. * @param paramMap
  37. * @return
  38. * */
  39. boolean preStore(Map<String, Object> paramMap) throws BusinessCheckException;
  40. /**
  41. * 获取会员卡券列表
  42. * @param userId
  43. * @param status
  44. * @return
  45. * */
  46. List<MtUserCoupon> getUserCouponList(Integer userId, List<String> status) throws BusinessCheckException;
  47. /**
  48. * 获取用户的卡券
  49. * @param paramMap 查询参数
  50. * @throws BusinessCheckException
  51. * */
  52. ResponseObject getUserCouponList(Map<String, Object> paramMap) throws BusinessCheckException;
  53. /**
  54. * 获取会员可支付用的卡券
  55. *
  56. * @param userId 会员ID
  57. * @param storeId 使用门店
  58. * @param useFor 用途
  59. * @return
  60. * */
  61. List<CouponDto> getPayAbleCouponList(Integer userId, Integer storeId, String useFor) throws BusinessCheckException;
  62. /**
  63. * 获取会员卡券详情
  64. * @param userId
  65. * @param couponId
  66. * */
  67. List<MtUserCoupon> getUserCouponDetail(Integer userId, Integer couponId) throws BusinessCheckException;
  68. /**
  69. * 获取会员卡券详情
  70. *
  71. * @param userCouponId
  72. * @return
  73. * */
  74. MtUserCoupon getUserCouponDetail(Integer userCouponId) throws BusinessCheckException;
  75. /**
  76. * 根据过期时间查询会员卡券
  77. *
  78. * @param userId
  79. * @param status
  80. * @param startTime
  81. * @param endTime
  82. * @return
  83. * */
  84. List<MtUserCoupon> getUserCouponListByExpireTime(Integer userId, String status, String startTime, String endTime) throws BusinessCheckException;
  85. /**
  86. * 给会员发送卡券(会员购买)
  87. *
  88. * @param orderId 订单ID
  89. * @param couponId 卡券ID
  90. * @param userId 会员ID
  91. * @param mobile 会员手机号
  92. * @return
  93. * */
  94. boolean buyCouponItem(Integer orderId, Integer couponId, Integer userId, String mobile) throws BusinessCheckException;
  95. }