ProductMaterialController.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package easydo.technology.controller;
  2. import easydo.technology.model.ProductMaterial;
  3. import easydo.technology.service.ProductMaterialService;
  4. import org.springframework.http.HttpStatus;
  5. import org.springframework.http.ResponseEntity;
  6. import org.springframework.web.bind.annotation.RequestBody;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import javax.annotation.Resource;
  10. import java.util.Map;
  11. @RestController
  12. @RequestMapping("/processMaterial")
  13. public class ProductMaterialController {
  14. @Resource
  15. ProductMaterialService productMaterialService;
  16. @RequestMapping(value = "/getList")
  17. public Object getList(@RequestBody Map<String, Object> map) throws Exception {
  18. Object list = productMaterialService.getList(map);
  19. return new ResponseEntity<>(list, HttpStatus.OK);
  20. }
  21. @RequestMapping(value = "/getPage")
  22. public Object getPage(@RequestBody Map<String, Object> map) throws Exception {
  23. Object page = productMaterialService.getPage(map);
  24. return new ResponseEntity<>(page, HttpStatus.OK);
  25. }
  26. @RequestMapping(value = "/save")
  27. public Object save(@RequestBody ProductMaterial model) throws Exception {
  28. Object result = productMaterialService.save(model);
  29. return new ResponseEntity<>(result, HttpStatus.OK);
  30. }
  31. @RequestMapping(value = "/update")
  32. public Object update(@RequestBody ProductMaterial model) throws Exception {
  33. Object result = productMaterialService.update(model);
  34. return new ResponseEntity<>(result, HttpStatus.OK);
  35. }
  36. @RequestMapping(value = "/remove")
  37. public Object remove(@RequestBody ProductMaterial model) throws Exception {
  38. Object result = productMaterialService.remove(model);
  39. return new ResponseEntity<>(result, HttpStatus.OK);
  40. }
  41. }