3fde687ef0d86908815ef02b48b8175282fb917e.svn-base 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package cn.com.goldenwater.dcproj.controller.fjwtenf;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.dcproj.model.BisInspFjwtenfKey;
  5. import cn.com.goldenwater.dcproj.service.BisInspFjwtenfKeyService;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import io.swagger.annotations.ApiParam;
  9. import org.apache.commons.lang3.StringUtils;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.*;
  12. /**
  13. * @author lhc
  14. * @date 2021-10-9
  15. */
  16. @Api(value = "福建县水行政执法监督检查-监督工作要点管理", tags = "福建县水行政执法监督检查-监督工作要点管理")
  17. @RestController
  18. @RequestMapping("/bis/insp/fjwtenf/key")
  19. public class BisInspFjwtenfKeyController extends BaseController {
  20. @Autowired
  21. private BisInspFjwtenfKeyService bisInspFjwtenfKeyService;
  22. @ApiOperation(value = "修改福建县水行政执法监督检查-监督工作要点")
  23. @RequestMapping(value = "", method = RequestMethod.POST)
  24. public BaseResponse<BisInspFjwtenfKey> insert(@ApiParam(name = "bisInspFjwtenfKey", value = "BisInspFjwtenfKey", required = true)
  25. @RequestBody BisInspFjwtenfKey bisInspFjwtenfKey) {
  26. int ret = 0;
  27. if (StringUtils.isBlank(bisInspFjwtenfKey.getId())) {
  28. ret = bisInspFjwtenfKeyService.insert(bisInspFjwtenfKey);
  29. } else {
  30. ret = bisInspFjwtenfKeyService.update(bisInspFjwtenfKey);
  31. }
  32. return buildSuccessResponse(bisInspFjwtenfKey);
  33. }
  34. @ApiOperation(value = "根据ID删除福建县水行政执法监督检查-监督工作要点")
  35. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  36. public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  37. int ret = bisInspFjwtenfKeyService.delete(id);
  38. return buildSuccessResponse();
  39. }
  40. @ApiOperation(value = "根据ID获取福建县水行政执法监督检查-监督工作要点(单表)")
  41. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  42. public BaseResponse<BisInspFjwtenfKey> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  43. BisInspFjwtenfKey bisInspFjwtenfKey = bisInspFjwtenfKeyService.get(id);
  44. return buildSuccessResponse(bisInspFjwtenfKey);
  45. }
  46. }