diff options
| author | liuyongqiang <[email protected]> | 2020-12-07 18:09:51 +0800 |
|---|---|---|
| committer | liuyongqiang <[email protected]> | 2020-12-07 18:09:51 +0800 |
| commit | 68151bc861677d98f10d8f69f7ee020e20d14a31 (patch) | |
| tree | a4b6a4f50895852681383f7c231db44985e24d17 | |
| parent | 46e757fa9c80f2a1bdbbb1bfa62a2f1b5b397bf0 (diff) | |
update sqlQuery demo
| -rw-r--r-- | galaxy-business-api/src/main/java/com/mesalab/api/modules/demo/service/impl/DemoServiceImpl.java | 4 | ||||
| -rw-r--r-- | galaxy-business-api/src/main/resources/sql-temelate.sql | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/galaxy-business-api/src/main/java/com/mesalab/api/modules/demo/service/impl/DemoServiceImpl.java b/galaxy-business-api/src/main/java/com/mesalab/api/modules/demo/service/impl/DemoServiceImpl.java index af656ba..e5c668f 100644 --- a/galaxy-business-api/src/main/java/com/mesalab/api/modules/demo/service/impl/DemoServiceImpl.java +++ b/galaxy-business-api/src/main/java/com/mesalab/api/modules/demo/service/impl/DemoServiceImpl.java @@ -1,5 +1,6 @@ package com.mesalab.api.modules.demo.service.impl; +import com.jfinal.plugin.activerecord.Db; import com.mesalab.api.common.base.BaseResult; import com.mesalab.api.modules.demo.service.DemoService; import org.springframework.beans.factory.annotation.Autowired; @@ -26,7 +27,8 @@ public class DemoServiceImpl implements DemoService { @Override public BaseResult sqlQuery() { - String url = "http://galaxy-query-engine/?query=select * from sys_storage_log limit 10"; + String storage = Db.getSql("storageLog"); + String url = "http://galaxy-query-engine/?query=".concat(storage); return restTemplate.getForObject(url, BaseResult.class); } } diff --git a/galaxy-business-api/src/main/resources/sql-temelate.sql b/galaxy-business-api/src/main/resources/sql-temelate.sql index f3c2ca5..46a7d7b 100644 --- a/galaxy-business-api/src/main/resources/sql-temelate.sql +++ b/galaxy-business-api/src/main/resources/sql-temelate.sql @@ -4,4 +4,8 @@ #sql("reportResults") select * from report_result where job_id = ? and status !=2 order by op_time desc +#end + +#sql("storageLog") + select * from sys_storage_log limit 10 #end
\ No newline at end of file |
