Angularjs + SpringMvc绑定List复杂参数
发布时间:2020-12-17 09:38:04 所属栏目:安全 来源:网络整理
导读:java /** * 删除购物车物资信息 * @param saveGouwcVo * @return */@RequestMapping(value="/deleteGouwc",method=RequestMethod.POST)public RestfulResponseBody deleteGouwc(@RequestBody SaveGouwcVo saveGouwcVo){try{cgGouwcService.deleteGouwc(saveG
/** * 删除购物车物资信息 * @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 List<CgGouwc> cgGouwc; public List<CgGouwc> getCgGouwc() { return cgGouwc; } public void setCgGouwc(List<CgGouwc> cgGouwc) { this.cgGouwc = cgGouwc; }
$scope.saveGouwcVo = {}; $scope.cgGouwc = [{"gouwc_id":"2222","zhangh_id":"23232","ziydwz_id":"23232"},{"gouwc_id":"2222","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); } }); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |