package com.sqx.modules.activity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.common.utils.PageUtils;
import com.sqx.modules.activity.bo.ShopActivityBO;
import com.sqx.modules.activity.dto.ActivityDTO;
import com.sqx.modules.activity.dto.ActivityQueryDTO;
import com.sqx.modules.activity.entity.Activity;
import com.sqx.modules.activity.vo.ActivityOrderVO;
import com.sqx.modules.activity.vo.ActivityVO;
import com.sqx.modules.activity.vo.OrderSuitActivityVO;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

/**
 * 活动
 * @author : codingliang
 * @date : 2024-6-17
 */
public interface ActivityService extends IService<Activity> {

    ActivityVO getActivityById(Long id);

    PageUtils pageActivity(ActivityQueryDTO queryDTO);

    void addActivity(ActivityDTO activityDTO);

    void updateActivity(ActivityDTO activityDTO);

    void updateActivityStatus(Long id, String flag);

    void updateActivityJoinMethod(Long id, String flag);

    void deleteActivity(List<Long> ids);

    /**
     * 查询根据店铺id和商品id获取可参与的活动
     * @param shopId 店铺id
     * @param goodsId 商品id
     * @return 店铺活动列表
     */
    List<ShopActivityBO> getActivityListByShopIdAndGoodsId(Long shopId, Long goodsId);

    /**
     * 获取订单适用活动列表
     * @param orderId 订单id
     * @return 活动列表
     */
    List<OrderSuitActivityVO> getOrderSuitActivity(Long orderId);

    /**
     * 获取订单最适用活动
     * @param orderId 订单id
     * @return 活动
     */
    OrderSuitActivityVO getOrderBestActivity(Long orderId);

    ActivityOrderVO selectByOrder(Long orderId);

    /**
     * 根据活动id查询
     * @param ids
     * @return
     */
    List<ActivityVO> getActivityByIds(List<Long> ids);
}
