|  |  |  | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | //    @RequiresPermissions("business:basegoods:create") | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody BaseGoodsCreateOrUpdateRequest baseGoods) { | 
|---|
|  |  |  | return ApiResponse.success(baseGoodsService.create(baseGoods)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @GetMapping("/{id}") | 
|---|
|  |  |  | //    @RequiresPermissions("business:basegoods:query") | 
|---|
|  |  |  | public ApiResponse findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(baseGoodsService.findById(id)); | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:query") | 
|---|
|  |  |  | public ApiResponse<BaseGoodsDTO> findById(@PathVariable Integer id) { | 
|---|
|  |  |  | return ApiResponse.success(baseGoodsService.findByIdBaseGoods(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主键上下架 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param idList 实体对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @PostMapping("/{status}") | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:query") | 
|---|
|  |  |  | public ApiResponse updateStatusByIds(@RequestBody List<Integer> idList, @PathVariable Integer status){ | 
|---|
|  |  |  | baseGoodsService.updateStatusByIds(idList,status); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | @ApiOperation("根据ID查询批量上架下架") | 
|---|
|  |  |  | @PostMapping("/updateStatus") | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:update") | 
|---|
|  |  |  | public ApiResponse updateStatusByIds(@RequestBody   BaseGoods param ){ | 
|---|
|  |  |  | baseGoodsService.updateStatusByIds(param); | 
|---|
|  |  |  | return ApiResponse.success("操作成功!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主键上下架 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param id 实体对象 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|
|  |  |  | @GetMapping("/updateStatusById") | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:query") | 
|---|
|  |  |  | public ApiResponse updateStatusById(@RequestParam Integer id,@RequestParam Integer status){ | 
|---|
|  |  |  | baseGoodsService.updateStatusById(id,status); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //    /** | 
|---|
|  |  |  | //     * 主键上下架 | 
|---|
|  |  |  | //     * | 
|---|
|  |  |  | //     * @param id 实体对象 | 
|---|
|  |  |  | //     */ | 
|---|
|  |  |  | //    @ApiOperation("上架 、下架") | 
|---|
|  |  |  | //    @GetMapping("/updateStatusById") | 
|---|
|  |  |  | //    @RequiresPermissions("business:basegoods:update") | 
|---|
|  |  |  | //    public ApiResponse updateStatusById(@RequestParam Integer id,@RequestParam Integer status){ | 
|---|
|  |  |  | //        baseGoodsService.updateStatusById(id,status); | 
|---|
|  |  |  | //        return ApiResponse.success(null); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 主键查询 | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据ID查询平台商品详细信息") | 
|---|
|  |  |  | @GetMapping("/findByIdBaseGoods") | 
|---|
|  |  |  | //    @RequiresPermissions("business:basegoods:query") | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:query") | 
|---|
|  |  |  | public ApiResponse<BaseGoodsDTO> findByIdBaseGoods(@RequestParam Integer id){ | 
|---|
|  |  |  | BaseGoodsDTO byIdBaseGoods = baseGoodsService.findByIdBaseGoods(id); | 
|---|
|  |  |  | return ApiResponse.success(byIdBaseGoods); | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation("根据ID修改-编辑修改") | 
|---|
|  |  |  | @PostMapping("/update") | 
|---|
|  |  |  | //    @RequiresPermissions("business:basegoods:update") | 
|---|
|  |  |  | @RequiresPermissions("business:basegoods:update") | 
|---|
|  |  |  | public ApiResponse update(@RequestBody BaseGoodsCreateOrUpdateRequest baseGoods){ | 
|---|
|  |  |  | baseGoodsService.update(baseGoods); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|