修复门禁:将空响应Mutation归类为外部结果不确定

This commit is contained in:
wangzhibiao committed 2026-09-21 16:56:01 +08:00
1 parent 9922ae3aa4
commit 63914e2499
1 file changed
+3 -2
@@ -6,6 +6,7 @@ import com.ruoyi.train.integration.dms.dto.DmsPasswordCreateResponse;
import com.ruoyi.train.integration.dms.dto.DmsPasswordDeleteRequest;
import com.ruoyi.train.integration.dms.dto.DmsPasswordDeleteResponse;
import com.ruoyi.train.integration.dms.exception.DmsBusinessException;
import com.ruoyi.train.integration.dms.exception.DmsTransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -52,7 +53,7 @@ public class DmsPasswordClient {
JSONObject resp = httpClient.postMutation("/rest/doorlock/online-password-key/create", request, JSONObject.class);
if (resp == null) {
throw new DmsBusinessException("EMPTY_RESPONSE", "Received null response from DMS password creation");
throw new DmsTransportException("EMPTY_RESPONSE: Received null response from DMS password creation");
}
JSONObject data = resp.getJSONObject("data");
@@ -87,7 +88,7 @@ public class DmsPasswordClient {
JSONObject resp = httpClient.postMutation("/rest/doorlock/online-password/delete", reqBody, JSONObject.class);
if (resp == null) {
throw new DmsBusinessException("EMPTY_RESPONSE", "Received null response from DMS password deletion");
throw new DmsTransportException("EMPTY_RESPONSE: Received null response from DMS password deletion");
}
JSONObject data = resp.getJSONObject("data");