package cn.com.goldenwater.dcproj.controller; import cn.com.goldenwater.core.web.BaseController; import cn.com.goldenwater.core.web.BaseResponse; import cn.com.goldenwater.dcproj.model.BisInspUnwtSyn; import cn.com.goldenwater.dcproj.service.BisInspUnwtSynService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * @author lhc * @date 2021-5-27 */ @Api(value = "xxx管理", tags = "xxx管理") @RestController @RequestMapping("/bis/insp/unwt/syn") public class BisInspUnwtSynController extends BaseController { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private BisInspUnwtSynService bisInspUnwtSynService; @ApiOperation(value = "修改xxx") @RequestMapping(value = "", method = RequestMethod.POST) public BaseResponse insert(@ApiParam(name = "bisInspUnwtSyn", value = "BisInspUnwtSyn", required = true) @RequestBody BisInspUnwtSyn bisInspUnwtSyn) { bisInspUnwtSynService.update(bisInspUnwtSyn); return buildSuccessResponse(bisInspUnwtSyn); } @ApiOperation(value = "根据ID删除xxx") @RequestMapping(value = "delete/{id}", method = RequestMethod.POST) public BaseResponse delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { int ret = bisInspUnwtSynService.delete(id); return buildSuccessResponse(); } @ApiOperation(value = "根据ID获取xxx(单表)") @RequestMapping(value = "/{id}", method = RequestMethod.GET) public BaseResponse get(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id) { BisInspUnwtSyn bisInspUnwtSyn = bisInspUnwtSynService.get(id); return buildSuccessResponse(bisInspUnwtSyn); } }