1234567891011121314151617181920212223242526 |
- package com.zskk.control;
- import java.util.List;
- import com.jfinal.core.Controller;
- import com.jfinal.plugin.activerecord.Db;
- import com.jfinal.plugin.activerecord.Record;
- import com.zskk.model.Reports;
- public class ViewController extends Controller {
- /**
- * 在被连接数据库执行sql语句
- */
- public void executeSql() {
- try {
- List<Reports> d = Reports.dao.use("zskk").find("SELECT * FROM doctors where hid = 74100001");
- this.renderJson(d);
- } catch (Exception e) {
- // TODO: handle exception
- this.renderText(e.toString());
- }
-
- }
-
- }
|