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));
|
}
|
}
|