|
@@ -26,6 +26,9 @@ import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
|
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
+import com.zskk.service.DataService;
|
|
|
+import com.zskk.service.ServiceFactory;
|
|
|
+
|
|
|
import okhttp3.FormBody;
|
|
|
import okhttp3.MediaType;
|
|
|
import okhttp3.OkHttpClient;
|
|
@@ -45,6 +48,13 @@ public class ViewController extends Controller {
|
|
|
public void executeSql() {
|
|
|
List<Record> d = Db.use("connected").find(this.getPara("sqlstr"));
|
|
|
this.renderJson(d);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void executeSql2() {
|
|
|
+ DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
+ JSONArray jsonArray = dService.getExamList(10);
|
|
|
+ renderText(jsonArray.toJSONString());
|
|
|
+
|
|
|
}
|
|
|
private static void trustAllHosts() {
|
|
|
final String TAG = "trustAllHosts";
|