package com.yeshi.fanli.service.inter.user;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
|
import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
|
import com.yeshi.fanli.entity.system.SystemCoupon;
|
import com.yeshi.fanli.exception.user.UserSystemCouponException;
|
import com.yeshi.fanli.vo.user.UserSystemCouponRecordVO;
|
import com.yeshi.fanli.vo.user.UserSystemCouponVO;
|
|
public interface UserSystemCouponService {
|
|
public int insertSelective(UserSystemCoupon record);
|
|
public UserSystemCoupon selectByPrimaryKey(Long id);
|
|
public int updateByPrimaryKeySelective(UserSystemCoupon record);
|
|
public int updateByPrimaryKey(UserSystemCoupon record);
|
|
/**
|
* 查询用户券列表 返回基础对象
|
* @param start
|
* @param count
|
* @param uid
|
* @return
|
*/
|
public List<UserSystemCoupon> getUserCouponList(long start, int count, Long uid);
|
|
/**
|
* 查询用户券列表 返回VO对象
|
* @param start
|
* @param count
|
* @param uid
|
* @return
|
*/
|
public List<UserSystemCouponVO> getUserCouponVOList(long start, int count, Long uid, boolean changeJump ) throws UserSystemCouponException, Exception;
|
|
/**
|
* 统计数量
|
* @param uid
|
* @return
|
*/
|
public long countUserCouponList(Long uid);
|
|
/**
|
* 券ID信息查询用户拥有券
|
* @param uid
|
* @param couponList
|
* @return
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public List<UserSystemCouponVO> getEnableListByCouponId(Long uid, Integer activated, List<SystemCoupon> couponList)
|
throws UserSystemCouponException, Exception;
|
|
/**
|
* 查询订单使用相关券
|
* @param uid
|
* @return
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public List<UserSystemCouponVO> getOrderCouponList(Long uid) throws UserSystemCouponException, Exception;
|
|
/**
|
* 查询商品使用相关券
|
* @param uid
|
* @return
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public List<UserSystemCouponVO> getGoodsCouponList(Long uid, Long auctionId) throws UserSystemCouponException, Exception;
|
|
/**
|
* 更新券使用记录
|
* @param uid
|
* @param id
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public void useGoodsCoupon(Long uid, Long id, Long goodId) throws UserSystemCouponException, Exception;
|
|
|
/**
|
* 更新券使用记录
|
* @param uid
|
* @param id
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public void useOrderCoupon(Long uid, Long id, String orderNo) throws UserSystemCouponException, Exception;
|
|
/**
|
* 根据订单号获取奖励券使用进度
|
* @param orderNo
|
* @return
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public UserSystemCouponRecordVO getRewardCouponRecord(String orderNo) throws UserSystemCouponException, Exception;
|
|
/**
|
* 是否存在奖励券
|
* @param uid
|
* @return
|
*/
|
public boolean hasRewardCoupon(Long uid);
|
|
/**
|
* 根据订单号获取免单券使用进度
|
* @param orderNo
|
* @return
|
* @throws UserSystemCouponException
|
* @throws Exception
|
*/
|
public UserSystemCouponRecordVO getFreeCouponRecord(String orderNo) throws UserSystemCouponException, Exception;
|
|
/**
|
* 根据订单来源查询
|
* @param uid
|
* @param source
|
* @return
|
*/
|
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);
|
|
/**
|
* 退回券
|
* @param uid
|
*/
|
public void sendBackTimeOutCoupon(Long uid);
|
|
/**
|
* 激活福利免单券
|
* @param uid
|
*/
|
public void activatedWelfareFreeCoupon(Long uid, String from);
|
|
/**
|
* 更新券记录 ——匹配免单券
|
* @param uid 用户id
|
* @param orderNo 订单号
|
* @param payment 付款金额
|
* @param auctionId 商品id(淘宝)
|
* @return 免单成功 true
|
* @throws Exception
|
*/
|
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 platform
|
* @param device
|
* @throws Exception
|
*/
|
public void copyLotteryPrize(Long uid, int platform, String device) throws Exception;
|
|
|
/**
|
* 领取券
|
* @param uid
|
* @throws Exception
|
*/
|
public void receivedCoupon(Long uid) throws Exception;
|
|
|
/**
|
* 统计今日抽奖中的券数量
|
* @param uid
|
* @param source
|
* @return
|
*/
|
public int countTodatyUserCouponBySource(Long uid, String source);
|
|
/**
|
* 随机生成奖励券
|
* @param num
|
* @param uid
|
* @param source
|
* @throws Exception
|
*/
|
public void randomRewardCoupon(int num, Long uid, String source) throws Exception;
|
|
}
|