21 lines
532 B
Java
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));
|
|
}
|
|
|
|
|
|
} |