package cn.pluss.platform.activityActivate;

import java.util.List;
import java.util.Map;

import cn.pluss.platform.entity.ActivityActivate;
import cn.pluss.platform.mapper.ActivityActivateMapper;
import com.baomidou.mybatisplus.extension.service.IService;

public interface ActivityActivateService extends IService<ActivityActivate> {

    default ActivityActivate queryActivityActivate(ActivityActivate activityActivate) {
        return ((ActivityActivateMapper) getBaseMapper()).queryActivityActivate(activityActivate);
    }

    default List<ActivityActivate> queryActivityActivateList(ActivityActivate activityActivate) {
        return ((ActivityActivateMapper) getBaseMapper()).queryActivityActivateList(activityActivate);
    }

    default void saveActivityActivate(ActivityActivate activityActivate) {
        getBaseMapper().insert(activityActivate);
    }

    default void updateActivityActivate(ActivityActivate activityActivate) {
        getBaseMapper().updateById(activityActivate);
    }

    default void deleteActivityActivate(ActivityActivate activityActivate) {
        getBaseMapper().deleteById(activityActivate.getId());
    }

    default List<ActivityActivate> queryActivityActivatePage(Map<String, Object> map) {
        return ((ActivityActivateMapper) getBaseMapper()).queryActivityActivatePage(map);
    }

    default List<ActivityActivate> queryNoActivityActivatePage(Map<String, Object> map) {
        return ((ActivityActivateMapper) getBaseMapper()).queryNoActivityActivatePage(map);
    }

    default Integer queryActivityActivatePageCount(Map<String, Object> map) {
        return ((ActivityActivateMapper) getBaseMapper()).queryActivityActivatePageCount(map);
    }

    default Integer queryNoActivityActivatePageCount(Map<String, Object> map) {
        return ((ActivityActivateMapper) getBaseMapper()).queryNoActivityActivatePageCount(map);
    }

    default List<Map<String, Object>> getNewestActivityJoin(String storeId) {
        return ((ActivityActivateMapper) getBaseMapper()).getNewestActivityJoin(storeId);
    }

    /**
     * 通过type删除活动
     *
     * @param activityActivate
     */
    void delActByType(ActivityActivate activityActivate);

    void delByUserId(Integer userId);
}

