|
楼主 |
发表于 2016-5-5 19:03:56
|
显示全部楼层
- public class queryOrder {
- public static JSONObject getOrder(JSONObject params, ActionContext context) throws SQLException, NamingException, java.sql.SQLException {
-
- String userID = params.getString("userID");
-
- List<Object> sqlParams = new ArrayList<Object>();
- sqlParams.add(userID);
-
-
- Table table = null;
- Connection conn = context.getConnection("aprenren");
- String sql = "";
- try{
- if(userID != null && userID != ""){
- sql = "SELECT * FROM order WHERE order.grID = userID OR order.customerID = userID)";
- table = DataUtils.queryData(conn, sql, sqlParams, null, null, null);
- }
-
- return Transform.tableToJson(table);
-
- } finally {
- conn.close();
- }
-
-
- }
- }
复制代码
上面是我的JAVA代码。
下面是我的代码报错,帮我看看怎么回事呗
- 开始编译BAAS模型......
- 编译BAAS模型结束
- 编译用时: 0 秒
- 开始编译BAAS Service Java......
- com.justep.baas.compiler.CompileException: 编译模块Java出错
- E:\wex5\WeX5_V3.4\runtime\BaasServer\baas\aprenren\Aprenren__do.java:43: 错误: 需要';'
- JSONObject ret = aprenren.queryOrder:getOrder(params, context);
- ^
- 1 个错误
- at com.justep.baas.compiler.java.JavaCompiler.compile(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compileJavaDir(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compileJavaDir(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compileJavaDir(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compileJavaCode(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compile2jar(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compile2jar(Unknown Source)
- at com.justep.baas.compiler.java.Compiler.compile(Unknown Source)
- at com.justep.baas.compiler.CompilerFactory.main(Unknown Source)
复制代码
|
|