public String move(){
JSONObject jsonobj = new JSONObject();
try{
String userid = this.getWebUserId();
//System.out.println("======================"+this.getRequest().getParameter("docIds"));
String[] docIds = this.getRequest().getParameter("docIds").split(",");
//System.out.println("======================"+docIds.length);
String favorId = this.getRequest().getParameter("favorId");
if((!(null==docIds||"".equals(docIds)))&&(!(null==favorId||"".equals(favorId)))){
for(int i=0;i<docIds.length;i++){
if(!(null==docIds[i]||"".equals(docIds[i]))){
long docId = Long.parseLong(docIds[i]);
HashMap mapCond = new HashMap();
mapCond.put("docId", docId);
mapCond.put("extraCondition"," favor_id in (select favor_id from tb_favorite where user_id='"+userid+"') ");
mapCond.put("favorId", favorId);
favoriteMgr.updateFavoriteDoc(mapCond);
}
}
}
}catch(Exception e){
jsonobj.put("ResCode", "-1");
jsonobj.put("Reason", e.getMessage());
outWriteStream(jsonobj.toString());
return null;
}
jsonobj.put("ResCode", "0");
jsonobj.put("Reason", "");
outWriteStream(jsonobj.toString());
return null;
}当调用updateFavoriteDoc这个方法的时候,后台也发出了SQL语句,在PL/SQL上调试是没问题的。但不知道为什么代码不往下执行,而且debug跟进去看到toString() unavailable - no suspended threads,不知道有谁知道原因呢