- java
/** * 删除购物车物资信息 * @param saveGouwcVo * @return */ @RequestMapping(value="/deleteGouwc", method=RequestMethod.POST) public RestfulResponseBody deleteGouwc(@RequestBody SaveGouwcVo saveGouwcVo){ try{ cgGouwcService.deleteGouwc(saveGouwcVo); return setResponseEntity("操作成功!", Constants.ResponseResultFlag.SUCCESS, null); }catch (Exception e) { e.printStackTrace(); return setResponseEntity("操作失败!", Constants.ResponseResultFlag.ERROR, null); } }..... private ListcgGouwc; public List getCgGouwc() { return cgGouwc; } public void setCgGouwc(List cgGouwc) { this.cgGouwc = cgGouwc; }
- js
$scope.saveGouwcVo = {}; $scope.cgGouwc = [{"gouwc_id":"2222","zhangh_id":"23232","ziydwz_id":"23232"},{"gouwc_id":"2222","zhangh_id":"23232","ziydwz_id":"23232"},{"gouwc_id":"2222","zhangh_id":"23232","ziydwz_id":"23232"}]; $scope.saveGouwcVo.cgGouwc= $scope.cgGouwc; $http.post($rootScope.settings.shop + 'api/cgGouwc/deleteGouwc', $scope.saveGouwcVo ).success(function (response) { if (response.resultFlag) { layer.msg("操作成功!"); }else{ layer.msg(response.reason); } });