Your Name 2 anni fa
parent
commit
8ccb7da465

+ 16 - 0
service-fee/src/main/java/com/java110/fee/cmd/oweFeeCallable/SaveOweFeeCallableCmd.java

@@ -15,6 +15,7 @@
  */
 package com.java110.fee.cmd.oweFeeCallable;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.annotation.Java110Transactional;
@@ -66,6 +67,21 @@ public class SaveOweFeeCallableCmd extends Cmd {
         Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
         Assert.hasKeyAndValue(reqJson, "callableWay", "请求报文中未包含callableWay");
 
+        if (!reqJson.containsKey("roomIds")) {
+            throw new CmdException("未包含房屋信息");
+        }
+
+        JSONArray roomIds = reqJson.getJSONArray("roomIds");
+
+        if (roomIds == null || roomIds.size() < 1) {
+            throw new CmdException("未包含房屋信息");
+        }
+
+        if (!reqJson.containsKey("feeId") && !reqJson.containsKey("feeIds") && !reqJson.containsKey("configIds")) {
+            throw new CmdException("未包含需要催缴的费用");
+        }
+
+
         //todo 公众号校验
         if (OweFeeCallableDto.CALLABLE_WAY_WECHAT.equals(reqJson.getString("callableWay"))) {
             SmallWeChatDto smallWeChatDto = new SmallWeChatDto();