1cdcf780da21f3596c514bdb099489268917f919.svn-base 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package cn.com.goldenwater.dcproj.controller;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.dcproj.model.BisInspUnwtSyn;
  5. import cn.com.goldenwater.dcproj.service.BisInspUnwtSynService;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import io.swagger.annotations.ApiParam;
  9. import org.slf4j.Logger;
  10. import org.slf4j.LoggerFactory;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.*;
  13. /**
  14. * @author lhc
  15. * @date 2021-5-27
  16. */
  17. @Api(value = "xxx管理", tags = "xxx管理")
  18. @RestController
  19. @RequestMapping("/bis/insp/unwt/syn")
  20. public class BisInspUnwtSynController extends BaseController {
  21. private Logger logger = LoggerFactory.getLogger(getClass());
  22. @Autowired
  23. private BisInspUnwtSynService bisInspUnwtSynService;
  24. @ApiOperation(value = "修改xxx")
  25. @RequestMapping(value = "", method = RequestMethod.POST)
  26. public BaseResponse<BisInspUnwtSyn> insert(@ApiParam(name = "bisInspUnwtSyn", value = "BisInspUnwtSyn", required = true)
  27. @RequestBody BisInspUnwtSyn bisInspUnwtSyn) {
  28. bisInspUnwtSynService.update(bisInspUnwtSyn);
  29. return buildSuccessResponse(bisInspUnwtSyn);
  30. }
  31. @ApiOperation(value = "根据ID删除xxx")
  32. @RequestMapping(value = "delete/{id}", method = RequestMethod.POST)
  33. public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  34. int ret = bisInspUnwtSynService.delete(id);
  35. return buildSuccessResponse();
  36. }
  37. @ApiOperation(value = "根据ID获取xxx(单表)")
  38. @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  39. public BaseResponse<BisInspUnwtSyn> get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) {
  40. BisInspUnwtSyn bisInspUnwtSyn = bisInspUnwtSynService.get(id);
  41. return buildSuccessResponse(bisInspUnwtSyn);
  42. }
  43. }