Commit 0c1245c0 authored by Quxl's avatar Quxl

x

parent 7ab82873
...@@ -60,14 +60,13 @@ public class OrderServiceImpl implements OrderService { ...@@ -60,14 +60,13 @@ public class OrderServiceImpl implements OrderService {
String sql="exec up_NewCreateCartTempItem '"+shopNO+"','"+terminal+"' "; String sql="exec up_NewCreateCartTempItem '"+shopNO+"','"+terminal+"' ";
List<Map<String ,Object>> resultMap=jdbcTemplate.executeMutil(sql).getDatas().get(0); List<Map<String ,Object>> resultMap=jdbcTemplate.executeMutil(sql).getDatas().get(0);
System.out.println(sql);
if (Util.objTo(resultMap.get(0).get("Status"), Integer.class) == 0 && Util.objTo(resultMap.get(resultMap.size()-1).get("Status"), Integer.class) == 0) { if (Util.objTo(resultMap.get(0).get("Status"), Integer.class) == 0 && Util.objTo(resultMap.get(resultMap.size()-1).get("Status"), Integer.class) == 0) {
rjx = Rjx.jsonOk(); rjx = Rjx.jsonOk();
rjx.setData(resultMap); rjx.setData(resultMap);
} else { } else {
Map<String, Object> lastest = resultMap.get(resultMap.size() - 1); Map<String, Object> lastest = resultMap.get(resultMap.size() - 1);
rjx = Rjx.jsonErr().setMessage((String)lastest.get("ErrorMsg")); rjx = Rjx.jsonErr().setMessage((String)lastest.get("ErrorMsg")).setData(resultMap);
} }
return rjx.toJson(); return rjx.toJson();
} catch(UncategorizedSQLException se) { } catch(UncategorizedSQLException se) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment