| | |
| | | |
| | | import com.oying.domain.GenConfig; |
| | | import com.oying.service.GenConfigService; |
| | | import com.oying.utils.R; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | @ApiOperation("查询") |
| | | @GetMapping(value = "/{tableName}") |
| | | public ResponseEntity<GenConfig> queryGenConfig(@PathVariable String tableName){ |
| | | return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK); |
| | | public ResponseEntity<Object> queryGenConfig(@PathVariable String tableName) { |
| | | return new ResponseEntity<>(R.success(genConfigService.find(tableName)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | public ResponseEntity<GenConfig> updateGenConfig(@Validated @RequestBody GenConfig genConfig){ |
| | | return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK); |
| | | public ResponseEntity<Object> updateGenConfig(@Validated @RequestBody GenConfig genConfig) { |
| | | return new ResponseEntity<>(R.success(genConfigService.update(genConfig.getTableName(), genConfig)), HttpStatus.OK); |
| | | } |
| | | } |