lyh
2025-03-07 b864148d2a9afd5e1627b761da923cca8f8dfbd2
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
60
61
62
63
64
65
66
67
package org.jeecg.modules.dnc.controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dnc.entity.Cutter;
import org.jeecg.modules.dnc.service.ICutterService;
import org.springframework.web.bind.annotation.*;
 
@Slf4j
@Api(tags = "刀具信息")
@RestController
@RequestMapping("/nc/cutter")
public class CutterController extends JeecgController<Cutter, ICutterService> {
 
//    /**
//     * 根据业务id查询刀具列表
//     * @param businessId
//     * @param pageNo
//     * @param pageSize
//     * @return
//     */
//    @GetMapping("/getByBusinessId")
//    public Result<?> getByBusinessId(String businessId,Integer pageNo,Integer pageSize){
//        return Result.OK(service.getByBusinessId(businessId,pageNo,pageSize));
//    }
 
    /**
     * 新增刀具信息
     * @param cutter
     * @return
     */
    @AutoLog(value = "刀具信息-新增刀具信息")
    @ApiOperation(value = "刀具信息-新增刀具信息", notes = "刀具信息-新增刀具信息")
    @PostMapping("/add")
    public Result<?> add(@RequestBody Cutter cutter){
        return Result.OK(service.add(cutter));
    }
 
    /**
     * 编辑刀具信息
     * @param cutter
     * @return
     */
    @AutoLog(value = "刀具信息-编辑刀具信息")
    @ApiOperation(value = "刀具信息-编辑刀具信息", notes = "刀具信息-编辑刀具信息")
    @PutMapping("/edit")
    public Result<?> edit(@RequestBody Cutter cutter){
        return Result.OK(service.edit(cutter));
    }
 
    /**
     * 根据id删除刀具信息
     * @param id
     * @return
     */
    @AutoLog(value = "刀具信息-根据id删除刀具信息")
    @ApiOperation(value = "刀具信息-根据id删除刀具信息", notes = "刀具信息-根据id删除刀具信息")
    @DeleteMapping("/delete")
    public Result<?> delete(@RequestBody String id){
        return Result.OK(service.delete(id));
    }
 
}