diff --git a/yami-shop-service/src/main/java/com/yami/shop/dao/CategoryBrandMapper.java b/yami-shop-service/src/main/java/com/yami/shop/dao/CategoryBrandMapper.java new file mode 100644 index 0000000..87c9a0d --- /dev/null +++ b/yami-shop-service/src/main/java/com/yami/shop/dao/CategoryBrandMapper.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved. + * + * https://www.mall4j.com/ + * + * 未经允许,不可做商业用途! + * + * 版权所有,侵权必究! + */ + +package com.yami.shop.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yami.shop.bean.model.CategoryBrand; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 分类品牌Mapper接口,定义了与分类品牌相关的数据库操作 + * + * @author lanhai + */ +public interface CategoryBrandMapper extends BaseMapper { + + /** + * 批量插入分类品牌关系 + * @param categoryId 分类ID + * @param brandIds 品牌ID列表 + */ + void insertCategoryBrand(@Param("categoryId") Long categoryId, @Param("brandIds") List brandIds); + + /** + * 根据分类ID删除分类品牌关系 + * @param categoryId 分类ID + */ + void deleteByCategoryId(Long categoryId); + + /** + * 根据品牌ID删除分类品牌关系 + * @param brandId 品牌ID + */ + void deleteByBrandId(Long brandId); +} \ No newline at end of file