修改 applicationContext.xml 数据库配置信息
create table sql_detail(
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
client_sql varchar(1000),
host varchar(250),
username varchar(50),
password varchar(50),
param varchar(200),
client_ip varchar(25),
add_time timestamp NOT NULL default CURRENT_TIMESTAMP,
update_time timestamp NOT NULL default CURRENT_TIMESTAMP
)
create table history(
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
sql_id int,
run_sql varchar(1000),
param varchar(200),
run_time bigint,
client_ip varchar(25),
client_type varchar(10),
start_time timestamp NOT NULL default CURRENT_TIMESTAMP,
end_time timestamp NOT NULL default CURRENT_TIMESTAMP
)
sql 格式如下
select * from user where id<>{$id}
请求示例
http://localhost:8080/sql/run_by_id
需要 sql 的id ,post 参数如下
{
"id":5,
"param":[{"key":"id", "value":"1"},{"key":"name", "value":"3"}]
}
-
Notifications
You must be signed in to change notification settings - Fork 0
License
hellosix/data-service
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published