xin
2025-06-03 95dc030ad8e77303207a1a42a3afd9a7a6612d75
oying-generator/src/main/java/com/oying/rest/GenConfigController.java
@@ -2,6 +2,7 @@
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;
@@ -24,13 +25,13 @@
    @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);
    }
}