51 lines
1.3 KiB
Java
51 lines
1.3 KiB
Java
package com.xkrs.controller;
|
|
|
|
import com.xkrs.model.qo.CraftItemQoDelete;
|
|
import com.xkrs.model.qo.CraftItemQoInsert;
|
|
import com.xkrs.model.qo.CraftItemQoUpdate;
|
|
import com.xkrs.service.CraftItemService;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@RestController
|
|
public class CraftItemController {
|
|
|
|
@Resource
|
|
private CraftItemService craftItemService;
|
|
|
|
/**
|
|
* 添加工艺项目
|
|
*/
|
|
@PostMapping("/insertCraftItem")
|
|
public String insertCraftItem(@RequestBody CraftItemQoInsert insertQo) {
|
|
return craftItemService.insertCraftItem(insertQo);
|
|
}
|
|
|
|
/**
|
|
* 删除工艺项目
|
|
*/
|
|
@PostMapping("/deleteCraftItem")
|
|
public String deleteCraftItem(@RequestBody CraftItemQoDelete deleteQo) {
|
|
return craftItemService.deleteCraftItem(deleteQo);
|
|
}
|
|
|
|
/**
|
|
* 更新工艺项目名称
|
|
*/
|
|
@PostMapping("/updateCraftItem")
|
|
public String updateCraftItem(@RequestBody CraftItemQoUpdate updateQo) {
|
|
return craftItemService.updateCraftItem(updateQo);
|
|
}
|
|
|
|
/**
|
|
* 查询工艺项目
|
|
*/
|
|
@GetMapping("/queryCraftItem")
|
|
public String queryCraftItem(@RequestParam(required = false, value = "no") String no, @RequestParam(required = false, value = "name") String name) {
|
|
return craftItemService.queryCraftItem(no, name);
|
|
}
|
|
|
|
|
|
}
|