Quellcode durchsuchen

根据要求,将错误信息通过异常返回给UU互联

hejq vor 8 Jahren
Ursprung
Commit
f702fecbc6

+ 2 - 2
src/main/java/com/uas/platform/b2b/v2/service/impl/InviteRecordServiceImpl.java

@@ -243,7 +243,7 @@ public class InviteRecordServiceImpl implements InviteRecordService {
         JSONObject object = JSON.parseObject(result);
         String errorMsg = object.getString("error");
         if (!StringUtils.isEmpty(errorMsg)) {
-            map.put("error", errorMsg);
+            throw new IllegalOperatorException(errorMsg);
         } else {
             map.put("success", object.getString("success"));
         }
@@ -364,7 +364,7 @@ public class InviteRecordServiceImpl implements InviteRecordService {
             if (record.getId() != null) {
                 map.put("success", "邀请已发送");
             } else {
-                map.put("error", "邀请发送失败");
+                throw new IllegalOperatorException("邀请发送失败");
             }
         }
         // 同步一个数据到账户中心(不是必须,不判断状态)