SignOnBehalfControler.java 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.bosshand.virgo.api.controller;
  2. import com.bosshand.virgo.api.model.SignOnBehalf;
  3. import com.bosshand.virgo.api.service.SignOnBehalfService;
  4. import com.bosshand.virgo.core.response.Response;
  5. import io.swagger.annotations.ApiOperation;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.RequestBody;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RequestMethod;
  10. import org.springframework.web.bind.annotation.RestController;
  11. @RestController
  12. @RequestMapping("signonbehalf")
  13. public class SignOnBehalfControler {
  14. @Autowired
  15. private SignOnBehalfService signOnBehalfService;
  16. @ApiOperation(value = "查询", notes = "查询")
  17. @RequestMapping(value = "/query", method = RequestMethod.POST)
  18. public Response getList(@RequestBody SignOnBehalf signOnBehalf) {
  19. return Response.ok(signOnBehalfService.getList(signOnBehalf));
  20. }
  21. @ApiOperation(value = "新增", notes = "新增")
  22. @RequestMapping(value = "", method = RequestMethod.POST)
  23. public Response add(@RequestBody SignOnBehalf signOnBehalf) {
  24. signOnBehalfService.save(signOnBehalf);
  25. return Response.ok();
  26. }
  27. @ApiOperation(value = "编辑", notes = "编辑")
  28. @RequestMapping(value = "", method = RequestMethod.PUT)
  29. public Response edit(@RequestBody SignOnBehalf signOnBehalf) {
  30. signOnBehalfService.update(signOnBehalf);
  31. return Response.ok();
  32. }
  33. }