淘先锋技术网

首页 1 2 3 4 5 6 7
var   ids= new Array();
  $("input[class='detailCheck']:checked").each(function(i,k){
   var itemId=$(this).attr("itemId");
   ids[i]=itemId;
  });
  
  $.ajax({
   url : ctx + "/test/setNoProcess.do",
   type : "get",
   data :{ids:ids},
   success : function(data) {
    if ($.trim(data)=="success") {
      showTip("处理成功!");
     }else{
      showTip("处理失败!");
     }
   }
  });

后台springmvc 接收:

@RequestMapping("/test/setNoProcess") 
 @ResponseBody
 public String setNoProcess(@RequestParam(value = "ids[]")  Integer[]  ids){
  
   List<Integer>   list= Arrays.asList(ids); 
  
  try{
   decDeliverOrderService.getMapper().statusBatchUpdateToInit(list);
  }catch(Exception e){
   log.error(e);
   return  "error";
  }
  return  "success";
 }

 

转载于:https://www.cnblogs.com/watermelonban/p/9996105.html