|
@@ -23,7 +23,18 @@ public class ViewController extends Controller {
|
|
|
*/
|
|
|
public void executeSql() {
|
|
|
try {
|
|
|
- List<Record> d = Db.use("connected").find("select * from (select * from reportinfo order by REPORTDATE desc) where rownum <= 100 ");
|
|
|
+ List<Record> d = Db.use("connected").find("select * from (select * from reportinfo order by REPORTDATE acs) where rownum <= 100 ");
|
|
|
+ this.renderJson(d);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
+ this.renderText(e.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void executeSql2() {
|
|
|
+ try {
|
|
|
+ String sqlString = this.getPara("str");
|
|
|
+ List<Record> d = Db.use("connected").find(sqlString);
|
|
|
this.renderJson(d);
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|