package com.ruoyi.web.modules.freight.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.freight.domain.BizShopFreightTemplate;

/**
 * 店铺运费模版 Mapper
 */
public interface BizShopFreightTemplateMapper
{
    List<BizShopFreightTemplate> selectList(BizShopFreightTemplate query);

    BizShopFreightTemplate selectById(@Param("templateId") Long templateId, @Param("shopId") Long shopId);

    BizShopFreightTemplate selectDefaultByShopId(@Param("shopId") Long shopId);

    int countByName(@Param("shopId") Long shopId, @Param("templateName") String templateName,
            @Param("excludeTemplateId") Long excludeTemplateId);

    int insert(BizShopFreightTemplate template);

    int update(BizShopFreightTemplate template);

    int clearDefaultByShopId(@Param("shopId") Long shopId, @Param("excludeTemplateId") Long excludeTemplateId);

    int updateIsDefault(@Param("templateId") Long templateId, @Param("shopId") Long shopId,
            @Param("isDefault") String isDefault, @Param("updateBy") String updateBy);

    int logicDeleteByIds(@Param("templateIds") List<Long> templateIds, @Param("shopId") Long shopId,
            @Param("updateBy") String updateBy);
}
