package com.example.erp.controller.pp; import com.example.erp.common.Result; import com.example.erp.entity.pp.TagStyle; import com.example.erp.service.pp.TagStyleService; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Map; @RestController @RequestMapping("tagStyle") public class TagStyleController { private final TagStyleService tagStyleService; public TagStyleController(TagStyleService tagStyleService) { this.tagStyleService = tagStyleService; } @PostMapping("saveTag") public Result saveTag(@RequestBody TagStyle tagStyle){ return Result.success(tagStyleService.saveTag(tagStyle)); } @GetMapping("getTagList") public Result getTagList(){ return Result.success(tagStyleService.getTagList()); } @GetMapping("getTagById/{id}") public Result getTagById(@PathVariable("id") Integer id){ return Result.success(tagStyleService.getTagById(id)); } @PostMapping("deleteTag/{id}") public Result deleteTag(@PathVariable("id") Integer id){ return Result.success(tagStyleService.deleteTag(id)); } @PostMapping("updateTag") public Result updateTag(TagStyle tagStyle){ return Result.success(tagStyleService.updateTag(tagStyle)); } @PostMapping("addTag") public Result addTag(@RequestBody TagStyle tagStyle){ return Result.success(tagStyleService.addTag(tagStyle)); } @ApiOperation("修改标签打印次数") @PostMapping("/updatePrintNumber") public Result updatePrintNumber( @RequestBody Map object ) { return Result.success(tagStyleService.updatePrintNumberSv(object)); } }