|
|
|
@ -1,13 +1,3 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* https://www.mall4j.com/
|
|
|
|
|
*
|
|
|
|
|
* 未经允许,不可做商业用途!
|
|
|
|
|
*
|
|
|
|
|
* 版权所有,侵权必究!
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.yami.shop.dao;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
|
@ -17,26 +7,36 @@ import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* CategoryBrandMapper接口,继承自BaseMapper<CategoryBrand>,用于处理分类品牌相关的数据持久化操作。
|
|
|
|
|
* 它提供了针对分类品牌数据在数据库层面的增删等基本操作方法。
|
|
|
|
|
*
|
|
|
|
|
* @author lanhai
|
|
|
|
|
*/
|
|
|
|
|
public interface CategoryBrandMapper extends BaseMapper<CategoryBrand> {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 增加分类品牌
|
|
|
|
|
* @param categoryId 分类id
|
|
|
|
|
* @param brandIds 品牌id列表
|
|
|
|
|
*/
|
|
|
|
|
void insertCategoryBrand(@Param("categoryId") Long categoryId, @Param("brandIds") List<Long> brandIds);
|
|
|
|
|
/**
|
|
|
|
|
* 用于向数据库中插入分类品牌关联数据。
|
|
|
|
|
* 通常用于建立某个分类与多个品牌之间的关联关系。
|
|
|
|
|
* 例如,一个商品分类下可以关联多个品牌,此方法就是用来添加这种关联记录的。
|
|
|
|
|
*
|
|
|
|
|
* @param categoryId 分类的唯一标识符,通过这个ID可以确定具体是哪个分类。
|
|
|
|
|
* @param brandIds 品牌ID的列表,包含了需要与指定分类进行关联的多个品牌的ID。
|
|
|
|
|
*/
|
|
|
|
|
void insertCategoryBrand(@Param("categoryId") Long categoryId, @Param("brandIds") List<Long> brandIds);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除分类
|
|
|
|
|
* @param categoryId 分类id
|
|
|
|
|
*/
|
|
|
|
|
void deleteByCategoryId(Long categoryId);
|
|
|
|
|
/**
|
|
|
|
|
* 根据分类的ID,从数据库中删除与之相关的分类品牌关联记录。
|
|
|
|
|
* 也就是当某个分类不再需要或者被删除时,调用此方法来清理与之关联的品牌关联数据。
|
|
|
|
|
*
|
|
|
|
|
* @param categoryId 要删除关联记录所对应的分类的唯一标识符。
|
|
|
|
|
*/
|
|
|
|
|
void deleteByCategoryId(Long categoryId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据品牌名称删除分类品牌
|
|
|
|
|
* @param brandId 品牌id
|
|
|
|
|
*/
|
|
|
|
|
void deleteByBrandId(Long brandId);
|
|
|
|
|
/**
|
|
|
|
|
* 根据品牌的ID,从数据库中删除与之相关的分类品牌关联记录。
|
|
|
|
|
* 比如当某个品牌不再使用或者被删除时,通过此方法可以将该品牌与各个分类之间的关联数据从数据库中移除。
|
|
|
|
|
*
|
|
|
|
|
* @param brandId 要删除关联记录所对应的品牌的唯一标识符。
|
|
|
|
|
*/
|
|
|
|
|
void deleteByBrandId(Long brandId);
|
|
|
|
|
}
|