|
@@ -5,7 +5,6 @@ import java.util.List;
|
|
import com.jfinal.core.Controller;
|
|
import com.jfinal.core.Controller;
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
-import com.zskk.model.Reports;
|
|
|
|
|
|
|
|
public class ViewController extends Controller {
|
|
public class ViewController extends Controller {
|
|
|
|
|
|
@@ -14,7 +13,7 @@ public class ViewController extends Controller {
|
|
*/
|
|
*/
|
|
public void executeSql() {
|
|
public void executeSql() {
|
|
try {
|
|
try {
|
|
- List<Record> d = Db.use("connected").find("SELECT TOP 3 * FROM yhxx");
|
|
|
|
|
|
+ List<Record> d = Db.use("connected").find(this.getPara("sqlStr"));
|
|
this.renderJson(d);
|
|
this.renderJson(d);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
// TODO: handle exception
|
|
// TODO: handle exception
|