From 305d551bf7203b35ef5ef306bb8399d197f9d426 Mon Sep 17 00:00:00 2001 From: CR7 <1965214192@qq.com> Date: Mon, 16 Dec 2024 23:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yami/shop/dao/CategoryBrandMapper.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 yami-shop-service/src/main/java/com/yami/shop/dao/CategoryBrandMapper.java 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