sdk_gm/src/main/java/sdk_996/controller/SqlExecuteController.java
2025-03-04 10:08:30 +08:00

21 lines
532 B
Java

package sdk_996.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sdk_996.bean.vo.ResultVO;
import sdk_996.service.SqlExecuteService;
@RestController
@RequestMapping("/api")
public class SqlExecuteController {
@Autowired
private SqlExecuteService sqlExecuteService;
@PostMapping("/sql-query")
public ResultVO sqlQuery(@RequestBody String sql) {
return ResultVO.success(sqlExecuteService.performCustomQuery(sql));
}
}