package com.czg.market.service;

import com.czg.account.vo.ShopInfoCouponVO;
import com.czg.account.vo.UserCouponVo;
import com.czg.market.dto.ShopCouponDTO;
import com.czg.market.entity.ShopCoupon;
import com.czg.market.vo.ShopCouponPopUp;
import com.czg.market.vo.UserCouponVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 优惠券信息表 服务层。
 *
 * @author ww
 * @since 2025-09-11
 */
public interface ShopCouponService extends IService<ShopCoupon> {
    /**
     * 群聊可发放优惠券列表
     *
     * @param shopId 店铺id
     * @param search 优惠券名称模糊搜索
     */
    Page<ShopCouponDTO> chatCoupon(Long shopId, String search);

    Page<ShopCouponDTO> getCouponPage(ShopCouponDTO param);

    List<ShopCouponPopUp> getPopUp(Long shopId, Long userId, String getMode);

    void receivePopUp(Long shopId, Long userId, String getMode);

    ShopCouponDTO getCouponById(Long id);

    void addCoupon(ShopCouponDTO param);

    void updateCouponById(ShopCouponDTO param);

    void deleteCoupon(Long id);

    Page<UserCouponVO> find(Long userId, String name, Long shopId, Integer status);

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

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

    Boolean refund(Long orderId, Long shopUserId);

    List<ShopInfoCouponVO> getShopByCouponRecord(Long shopId, Long shopUserId);
}
