| | |
| | | import java.math.BigDecimal;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.exception.user.UserSystemCouponException;
|
| | | import com.yeshi.fanli.vo.user.UserSystemCouponRecordVO;
|
| | | import com.yeshi.fanli.vo.user.UserSystemCouponVO;
|
| | |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public List<UserSystemCouponVO> getUserCouponVOList(long start, int count, Long uid) throws UserSystemCouponException, Exception;
|
| | | public List<UserSystemCouponVO> getUserCouponVOList(long start, int count, Long uid, boolean changeJump ) throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 统计数量
|
| | |
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public List<UserSystemCouponVO> getGoodsCouponList(Long uid) throws UserSystemCouponException, Exception;
|
| | | public List<UserSystemCouponVO> getGoodsCouponList(Long uid, Long auctionId) throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 更新券使用记录
|
| | |
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public void useGoodsCoupon(Long uid, Long id, Long goodId) throws UserSystemCouponException, Exception;
|
| | | public void useGoodsCoupon(Long uid, Long id, Long goodId, Integer sourceType) throws UserSystemCouponException, Exception;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public void useOrderCoupon(Long uid, Long id, String orderNo) throws UserSystemCouponException, Exception;
|
| | | public void useOrderCoupon(Long uid, Long id, String orderNo, Integer sourceType, AcceptData acceptData) throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 根据订单号获取奖励券使用进度
|
| | |
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public UserSystemCouponRecordVO getRewardCouponRecord(String orderNo) throws UserSystemCouponException, Exception;
|
| | | public UserSystemCouponRecordVO getRewardCouponRecord(String orderNo, Integer sourceType) throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 是否存在奖励券
|
| | |
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public UserSystemCouponRecordVO getFreeCouponRecord(String orderNo) throws UserSystemCouponException, Exception;
|
| | | public UserSystemCouponRecordVO getFreeCouponRecord(String orderNo, Integer sourceType) throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 根据订单来源查询
|
| | |
| | | */
|
| | | public List<UserSystemCoupon> getUserCouponBySource(Long uid, String source);
|
| | |
|
| | | /**
|
| | | * 插入券信息
|
| | | * @param uid
|
| | | * @param couponType
|
| | | * @param source 来源
|
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public void insertUserCoupon(Long uid, String couponType, String source) throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 券已过期更新
|
| | | * @param uid
|
| | | */
|
| | | public void updateCounponInvalid(Long uid);
|
| | |
|
| | | /**
|
| | | * 退回券
|
| | |
| | | */
|
| | | public void sendBackTimeOutCoupon(Long uid);
|
| | |
|
| | | /**
|
| | | * 激活福利免单券
|
| | | * @param uid
|
| | | */
|
| | | public void activatedWelfareFreeCoupon(Long uid);
|
| | |
|
| | | /**
|
| | | * 更新券记录 ——匹配免单券
|
| | |
| | | */
|
| | | public boolean updateCouponRecordUsed(Long uid, String orderNo, BigDecimal payment, Long auctionId) throws Exception;
|
| | |
|
| | | /**
|
| | | * 订单退款更新 券记录状态并退回券
|
| | | * @param orderNo
|
| | | */
|
| | | public void updateStateByDrawback(String orderNo) throws Exception;
|
| | |
|
| | | /**
|
| | | * 红包到账 -- 更新券使用状态 -改为使用成功
|
| | | * @param orderNo
|
| | | * @throws Exception
|
| | | */
|
| | | public void updateStateByArrivalAccount(String orderNo) throws Exception;
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 统计今日抽奖中的券数量
|
| | | * @param uid
|
| | | * @param source
|
| | | * @return
|
| | | */
|
| | | public int countTodatyUserCouponBySource(Long uid, String source);
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 添加券
|
| | | * @param uid
|
| | | * @param couponType
|
| | | * @param source
|
| | | * @throws UserSystemCouponException
|
| | | */
|
| | | public void exchangeCoupon(Long uid, String couponType, String source,
|
| | | BigDecimal percent) throws UserSystemCouponException, Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 券列表 1.6.5
|
| | | * @param start
|
| | | * @param count
|
| | | * @param uid
|
| | | * @return
|
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public List<UserSystemCouponVO> getCouponList(AcceptData acceptData, long start, int count, Long uid) throws UserSystemCouponException, Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 赠送券生成口令
|
| | | * @param uid
|
| | | * @param id
|
| | | * @return
|
| | | * @throws UserSystemCouponException
|
| | | */
|
| | | public UserSystemCouponVO giveCoupon(Long uid, Long id) throws UserSystemCouponException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 赠送退回
|
| | | * @param id
|
| | | */
|
| | | public void sendBackGiveCoupon(List<UserSystemCouponGiveRecord> overdueList);
|
| | |
|
| | | /**
|
| | | * 查询需要过期的
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public List<UserSystemCoupon> getCounponNowInvalid(int count);
|
| | |
|
| | | /**
|
| | | * 过期券
|
| | | * @param list
|
| | | */
|
| | | public void updateCounponInvalid(List<UserSystemCoupon> list);
|
| | |
|
| | | /**
|
| | | * 有效奖励券
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public boolean getValidRebateCoupon(Long uid);
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询1.6.5之前的 不等于35%
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public List<UserSystemCouponVO> listIncludeNotExchange(Long uid) throws Exception;
|
| | |
|
| | | public long countCouponOld(Long uid);
|
| | |
|
| | | /**
|
| | | * 更新用户过期券
|
| | | * @param uid
|
| | | */
|
| | | public void updateInvalidSate(Long uid);
|
| | |
|
| | | /*
|
| | | * 赠送券
|
| | | */
|
| | | public void sendBackGiveUser(Long uid);
|
| | |
|
| | | /**
|
| | | * 统计可使用的免单券
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countUsableFreeCouponForBuy(Long uid);
|
| | | |
| | | /**
|
| | | * 统计可使用的奖励券
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countUsableRewardCoupon(Long uid);
|
| | |
|
| | | /**
|
| | | * 查询免券数量
|
| | | * @param uid
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public List<UserSystemCoupon> getFreeCouponByType(Long uid, String type);
|
| | |
|
| | | /**
|
| | | * 激活免单券---订单已到账 触发激活免单券
|
| | | * @param uid
|
| | | */
|
| | | public void triggerFreeCouponActivate(Long uid, String orderNo, Integer source);
|
| | |
|
| | | /**
|
| | | * 退回券
|
| | | * @param giveid
|
| | | */
|
| | | public void sendBackByGiveId(Long giveid);
|
| | |
|
| | | /**
|
| | | * 统计赠送免单券
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countGiveFreeCoupon(Long uid);
|
| | |
|
| | | |
| | | /**
|
| | | * 免单券获得
|
| | | * @param uid
|
| | | * @param typeEnum 类型
|
| | | * @param source 来源
|
| | | * @param num 数量
|
| | | * @param notify 是否发送消息
|
| | | * @return
|
| | | * @throws UserSystemCouponException
|
| | | */
|
| | | public UserSystemCoupon freeCouponWin(Long uid, CouponTypeEnum typeEnum, String source, int num, boolean notify)
|
| | | throws UserSystemCouponException, Exception;
|
| | |
|
| | | /**
|
| | | * 奖励券券获得
|
| | | * @param uid
|
| | | * @param typeEnum
|
| | | * @param source
|
| | | * @param num
|
| | | * @param notify
|
| | | * @param percent
|
| | | * @return
|
| | | * @throws UserSystemCouponException
|
| | | * @throws Exception
|
| | | */
|
| | | public UserSystemCoupon rewardCouponWin(Long uid, String source, int num, boolean notify,
|
| | | BigDecimal percent) throws UserSystemCouponException, Exception;
|
| | |
|
| | | }
|