CmCouponDao.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. package com.caimei.modules.coupon.dao;
  2. import com.caimei.modules.coupon.entity.CmCoupon;
  3. import com.caimei.modules.coupon.entity.CmCouponAssociate;
  4. import com.caimei.modules.coupon.entity.CmCouponClub;
  5. import com.caimei.modules.coupon.entity.CmCouponRedemptionCode;
  6. import com.caimei.modules.user.entity.CmUser;
  7. import com.caimei.modules.user.entity.NewCmShop;
  8. import com.thinkgem.jeesite.common.persistence.CrudDao;
  9. import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
  10. import org.apache.ibatis.annotations.Param;
  11. import java.util.List;
  12. /**
  13. * 优惠券管理DAO接口
  14. *
  15. * @author plf
  16. * @version 2021-08-02
  17. */
  18. @MyBatisDao
  19. public interface CmCouponDao extends CrudDao<CmCoupon> {
  20. List<CmCouponAssociate> findByProductType(String couponId);
  21. void insertCouponAssociate(CmCouponAssociate associate);
  22. List<Integer> findByCouponId(String couponId);
  23. void updateCouponAssociate(CmCouponAssociate a);
  24. void logicDeleteCouponAssociate(Integer id);
  25. void updateByDelFlag(String couponId);
  26. void updateAssociateByDelFlag(String couponId);
  27. CmCouponClub findCouponClub(String couponId);
  28. List<CmUser> findUserList(CmUser cmUser);
  29. List<NewCmShop> findShopList(NewCmShop newCmShop);
  30. Integer findRedemptionCodeNum(String couponId);
  31. CmCouponRedemptionCode findByRedemptionCode(String redemptionCode);
  32. void insertRedemptionCode(CmCouponRedemptionCode code);
  33. List<CmCouponRedemptionCode> findRedemptionCode(CmCouponRedemptionCode redemptionCode);
  34. /**
  35. * 查询已兑换数量
  36. *
  37. * @param couponId
  38. * @return
  39. */
  40. Integer findQuantityRedeemed(String couponId);
  41. /**
  42. * 查询机构下所有优惠券
  43. *
  44. * @param userId
  45. * @return
  46. */
  47. List<CmCoupon> findClubCouponList(Integer userId);
  48. /**
  49. * 查询活动券-指定商品
  50. *
  51. * @param couponId
  52. * @return
  53. */
  54. List<Integer> findAllProductId(String couponId);
  55. /**
  56. * 查询所有未兑换且有效的优惠券
  57. *
  58. * @return
  59. */
  60. List<CmCoupon> findNotRedeemedCoupon();
  61. /**
  62. * 修改优惠券使用状态
  63. *
  64. * @param clubCouponId
  65. */
  66. void updateClubCoupon(@Param("clubCouponId") Integer clubCouponId, @Param("orderId") Integer orderId);
  67. List<CmCoupon> findCouponList(@Param("userId")Integer userId,@Param("moneyCouponFlag")Integer moneyCouponFlag);
  68. List<CmCoupon> selconfigure();
  69. /**
  70. * 专属优惠券时间
  71. * @return
  72. */
  73. String selMonthTime();
  74. Integer selCouponId(@Param("couponId") String couponId);
  75. /**
  76. * 专属优惠券配置插入
  77. * @param cmCoupon
  78. */
  79. /*void insertConfigure(CmCoupon cmCoupon);
  80. *//**
  81. * 专属优惠券配置修改
  82. * @param cmCoupon
  83. *//*
  84. void updateConfigure(CmCoupon cmCoupon);
  85. List<Integer> configureCouponId(String couponId);
  86. void insertCouponConfigure(CmCouponAssociate associate);
  87. void updateCouponConfigure(CmCouponAssociate a);*/
  88. }