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