| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 镜架/镜片品牌表 前端控制器 |
| | | * 镜架-镜片品牌表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "镜架/镜片品牌表") |
| | | @Api(tags = "镜架-镜片品牌表") |
| | | @RestController |
| | | @RequestMapping("/t-brand") |
| | | public class TBrandController { |
| | |
| | | private TBrandService brandService; |
| | | |
| | | /** |
| | | * 获取镜架/镜片品牌列表 |
| | | * 获取镜架-镜片品牌列表 |
| | | */ |
| | | @ApiOperation(value = "获取镜架/镜片品牌分页列表") |
| | | @ApiOperation(value = "获取镜架-镜片品牌分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TBrandVO>> pageList(@RequestBody TBrandQuery query) { |
| | | return ApiResult.success(brandService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加镜架/镜片品牌 |
| | | * 添加镜架-镜片品牌 |
| | | */ |
| | | @ApiOperation(value = "添加镜架/镜片品牌") |
| | | @ApiOperation(value = "添加镜架-镜片品牌") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@Validated @RequestBody TBrand dto) { |
| | | brandService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改镜架/镜片品牌--启用、禁用、设置主要品牌接口") |
| | | @ApiOperation(value = "修改镜架-镜片品牌--启用、禁用、设置主要品牌接口") |
| | | @PostMapping(value = "/update") |
| | | public ApiResult<String> update(@RequestBody TBrand dto) { |
| | | brandService.updateById(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除镜架/镜片品牌") |
| | | @ApiOperation(value = "删除镜架-镜片品牌") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public ApiResult<Boolean> deleteById(@RequestParam Long id) { |
| | | return ApiResult.success(brandService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除镜架/镜片品牌") |
| | | @ApiOperation(value = "批量删除镜架-镜片品牌") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public ApiResult<Boolean> deleteByIds(@RequestBody List<Long> ids) { |
| | | return ApiResult.success(brandService.removeByIds(ids)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询镜架/镜片品牌详情") |
| | | @ApiOperation(value = "查询镜架-镜片品牌详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public ApiResult<TBrand> getDetailById(@RequestParam Long id) { |
| | | return ApiResult.success(brandService.getById(id)); |