document
API test

检索品牌对应的分类

GET
http://localhost:88/api/product/categorybrandrelation/catelog/list?brandId=9

Request Parameters

parameter
type
description
required
brandId
long
示例:9
required

Response Parameters

parameter
type
description
required
msg
string
示例:success
required
code
int
示例:0
required
data
array
数据列表
required
id
int
示例:13
required
brandId
int
示例:9
required
catelogId
int
示例:225
required
brandName
string
示例:华为
required
catelogName
string
示例:手机
required

Description or Example

# 核心代码 ```java @RequestMapping("/catelog/list") // @RequiresPermissions("product:categorybrandrelation:list") public R list(@RequestParam Map<String, Object> params, @RequestParam("brandId") Long brandId){ List<CategoryBrandRelationEntity> categoryBrandRelationEntities = categoryBrandRelationService.queryCategoryByBrandId(params, brandId); return R.ok().put("data", categoryBrandRelationEntities); } ``` ```java @Override public List<CategoryBrandRelationEntity> queryCategoryByBrandId(Map<String, Object> params, Long brandId) { LambdaQueryWrapper<CategoryBrandRelationEntity> wrapper = new LambdaQueryWrapper<>(); wrapper.eq(CategoryBrandRelationEntity::getBrandId, brandId); return this.baseMapper.selectList(wrapper); } ```