package com.kmall.admin.dao.mk.store;

import com.kmall.admin.entity.mk.store.MkStoreTicketGoodsTempEntity;
import com.kmall.manager.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

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

/**
 * 门店优惠券活动商品，临时表Dao
 *
 * @author emato
 * @email admin@qhdswl.com
 * @date 2019-05-09 17:33:29
 */
public interface MkStoreTicketGoodsTempDao extends BaseDao<MkStoreTicketGoodsTempEntity> {
    List<MkStoreTicketGoodsTempEntity> queryAllDiscountByStoreId(Map<String, Object> map);

    int queryTotallDiscountByStoreId(Map<String, Object> map);

    MkStoreTicketGoodsTempEntity queryGoodsTempByRealId(@Param("storeRelaId") Integer storeRelaId, @Param("guid")String guid);

    List<MkStoreTicketGoodsTempEntity> queryGoodsTempByGuid(@Param("guid")String guid);

    List<MkStoreTicketGoodsTempEntity> queryGoodsTempByGuidAndIsSubmit(MkStoreTicketGoodsTempEntity entity);

    List<MkStoreTicketGoodsTempEntity> queryGoodsTempByIsValid(MkStoreTicketGoodsTempEntity entity);

    /**
     * 查看排除已选择商品后的商品
     * @param entity
     * @return
     */
    List<MkStoreTicketGoodsTempEntity> queryGoodsTempIdBy(MkStoreTicketGoodsTempEntity entity);

    Integer deleteByGuid(@Param("guid")String guid);

    MkStoreTicketGoodsTempEntity queryGoodsTempByRealIdAndTopicId(@Param("storeRelaId") Integer storeRelaId, @Param("storeTopicId")Integer storeTopicId);

    List<MkStoreTicketGoodsTempEntity> queryGoodsTempByTopicId(@Param("storeTopicId")Integer storeTopicId);

    void deleteByStoreTopicIdAndRealId(@Param("storeRelaId") Integer storeRelaId, @Param("storeTopicId")Integer storeTopicId);

    void deleteByStoreTopicId(@Param("storeTopicId")Integer storeTopicId);
}
