wuyouming666
2025-03-04 f0968dbdfd956ae035cbc994ccb4eb374b6c8074
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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.seccess(tagStyleService.saveTag(tagStyle));
    }
 
    @GetMapping("getTagList")
    public Result getTagList(){
        return Result.seccess(tagStyleService.getTagList());
    }
    @GetMapping("getTagById/{id}")
    public Result getTagById(@PathVariable("id") Integer id){
        return Result.seccess(tagStyleService.getTagById(id));
    }
 
    @PostMapping("deleteTag/{id}")
    public Result deleteTag(@PathVariable("id") Integer id){
        return Result.seccess(tagStyleService.deleteTag(id));
    }
 
 
    @PostMapping("updateTag")
    public Result updateTag(TagStyle tagStyle){
        return Result.seccess(tagStyleService.updateTag(tagStyle));
    }
 
 
    @PostMapping("addTag")
    public Result addTag(@RequestBody TagStyle tagStyle){
        return Result.seccess(tagStyleService.addTag(tagStyle));
    }
 
    @ApiOperation("修改标签打印次数")
    @PostMapping("/updatePrintNumber")
    public Result updatePrintNumber(
            @RequestBody Map<String, Object> object
    ) {
        return Result.seccess(tagStyleService.updatePrintNumberSv(object));
    }
}