前台代码
$.ajax({ url : ‘<%=basePath%>userorderother/canUpdateCust.do‘, type : ‘POST‘, data: {‘kdcompany‘:kdcompany, ‘kdcardid‘:kdcardid, ‘odid‘:odid}, async : false, success : function(data) { location.reload(); } });
后台代码
/**修改地址信息 * @param * @throws Exception */ @RequestMapping(value="/canUpdateCust") @ResponseBody public PageData canUpdateCust() throws Exception{ PageData pd = new PageData(); pd = this.getPageData(); try { PageData custData = new PageData(); custData.put("ORDERID", pd.get("odid")); pd.remove("orderId"); JSONObject object = JSONObject.fromObject(pd); custData.put("CUSTOMERMAILING", object.toString()); userorderotherService.updateCust(custData); } catch (Exception e) { pd.put("status", "err"); pd.put("msg", e.getMessage()); } pd.put("status", "ok"); return pd; }
时间: 2024-10-20 22:49:07