package com.czg.account.service;

import com.czg.account.dto.QueryReceiveDto;
import com.czg.account.dto.ShopCouponDTO;
import com.czg.account.entity.ShopActivateCouponRecord;
import com.czg.account.entity.ShopCoupon;
import com.czg.account.vo.CouponReceiveVo;
import com.czg.account.vo.UserCouponVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 优惠券 服务层。
 *
 * @author ww
 * @since 2025-02-17
 */
public interface ShopCouponService extends IService<ShopCoupon> {

    /**
     * 优惠券列表
     *
     * @param shopId 店铺id
     * @param type   1-满减  2-商品
     * @param status 状态 0 未使用 1已使用 -1已过期
     */
    List<ShopCouponDTO> getList(Long shopId, Integer type, Integer status);

    Boolean add(ShopCouponDTO couponDTO);

    Boolean edit(ShopCouponDTO couponDTO);

    Page<CouponReceiveVo> queryReceive(QueryReceiveDto param);


    Page<ShopActivateCouponRecord> find(Long userId,Long shopId, Integer status);

    List<UserCouponVo> findCoupon(Long shopId, Long shopUserId, Integer type);

    Boolean use(List<Long> ids, Long shopUserId, Long orderId);

    Boolean refund(Long orderId, Long shopUserId);


}
