|
|
@@ -213,31 +213,9 @@ public class DemoServiceSMOImpl extends BaseComponentSMO implements IDemoService
|
|
|
*/
|
|
|
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不能为空");
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|