| | |
| | | paramIn.put("userId", pd.getUserId()); |
| | | paramIn.put("storeId", storeId); |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/parkingSpace.sellParkingSpace", |
| | | ServiceConstant.SERVICE_API_URL + "/api/demo.saveDemoConfig", |
| | | HttpMethod.POST); |
| | | |
| | | return responseEntity; |
| | |
| | | */ |
| | | private void validateSaveCar(IPageData pd) { |
| | | |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "communityId", "未包含小区ID"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "ownerId", "请求报文中未包含ownerId"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "carNum", "请求报文中未包含carNum"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "carBrand", "请求报文中未包含carBrand"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "carType", "请求报文中未包含carType"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "carColor", "未包含carColor"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "psId", "未包含psId"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "receivedAmount", "未包含receivedAmount"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "sellOrHire", "未包含sellOrHire"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "demoName", "未包含demoName"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "demoValue", "未包含demoValue"); |
| | | |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | Assert.hasLength(paramIn.getString("communityId"), "小区ID不能为空"); |
| | | Assert.hasLength(paramIn.getString("ownerId"), "ownerId不能为空"); |
| | | Assert.hasLength(paramIn.getString("psId"), "psId不能为空"); |
| | | Assert.hasLength(paramIn.getString("receivedAmount"), "receivedAmount不能为空"); |
| | | |
| | | if(!"H".equals(paramIn.getString("sellOrHire")) |
| | | && !"S".equals(paramIn.getString("sellOrHire"))){ |
| | | throw new IllegalArgumentException("入参错误,无法识别该操作"); |
| | | } |
| | | |
| | | if("H".equals(paramIn.getString("sellOrHire"))){ |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "cycles", "未包含cycles"); |
| | | Assert.hasLength(paramIn.getString("cycles"), "cycles不能为空"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | private void validateListDemo(IPageData pd) { |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "page", "请求报文中未包含page节点"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "row", "请求报文中未包含row节点"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "demoName", "请求中未包含demoName信息"); |
| | | Assert.jsonObjectHaveKey(pd.getReqData(), "demoValue", "请求中未包含demoValue信息"); |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | Assert.isInteger(paramIn.getString("page"), "page不是数字"); |
| | | Assert.isInteger(paramIn.getString("row"), "rows不是数字"); |