ICouponService.java 1.24 KB
package com.yohoufo.promotion.service;


import com.yohobuy.ufo.model.promotion.UserCouponsListBo;
import com.yohobuy.ufo.model.promotion.response.CouponInfo;

import java.util.List;

public interface ICouponService {


    public List<CouponInfo> queryCouponList(Integer uid);


    public int queryCouponCnt(Integer uid);

    /**
     * 领取优惠券
     * @param uid
     * @param couponTokens
     * @return
     */
    public List<String> batchSendCoupon(Integer uid, String couponTokens);

    /**
     * 使用优惠券
     * @param uid
     * @param couponCodes
     * @param orderCode
     * @return
     */
    public boolean useCoupon(Integer uid, List<String> couponCodes, long orderCode);

    /**
     * 退还优惠券
     * @param uid
     * @param couponCodes
     * @param orderCode
     * @return
     */
    public boolean cancelCoupon(Integer uid, List<String> couponCodes, long orderCode);

    /**
     * 获取优惠券列表(订单)
     * @param uid
     * @return
     */
    public UserCouponsListBo queryUserNoUsedCoupons(Integer uid);

    /**
     * 校验券并返回券信息
     *
     * @param uid
     * @param couponCodes
     * @return
     */
    UserCouponsListBo checkAndGetCoupons(int uid, List<String> couponCodes);

}