فهرست منبع

'调整rpc方法请求方式'

james 10 ماه پیش
والد
کامیت
1e4debd0fd

+ 2 - 2
service-fire/service-fire-api/src/main/java/com/usky/fire/RemoteFireService.java

@@ -14,6 +14,6 @@ import java.util.List;
 @FeignClient(contextId = "remoteFireService", value = "usky-fire" , fallbackFactory = RemoteFireFallbackFactory.class)
 public interface RemoteFireService {
 
-    @PostMapping("addPatrolInspectionAbnormalData")
-    ApiResult<Void> addPatrolInspectionAbnormalData();
+    @GetMapping(value = "/addPatrolInspectionAbnormalData")
+    public void addPatrolInspectionAbnormalData();
 }

+ 4 - 3
service-fire/service-fire-api/src/main/java/com/usky/fire/factory/RemoteFireFallbackFactory.java

@@ -23,10 +23,11 @@ public class RemoteFireFallbackFactory implements FallbackFactory<RemoteFireServ
     public RemoteFireService create(Throwable throwable)
     {
         log.error("用户服务调用失败:{}", throwable.getMessage());
-        return new RemoteFireService() {
+        return new RemoteFireService()
+        {
             @Override
-            public ApiResult<Void> addPatrolInspectionAbnormalData() {
-                throw new BusinessException(throwable.getMessage());
+            public void addPatrolInspectionAbnormalData() {
+
             }
         };
     }

+ 1 - 2
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/api/patrolInspectionDataApi.java

@@ -24,9 +24,8 @@ public class patrolInspectionDataApi implements RemoteFireService {
     @Autowired
     private PatrolInspectionPlanSonService patrolInspectionPlanSonService;
 
-    public ApiResult<Void> addPatrolInspectionAbnormalData(){
+    public void addPatrolInspectionAbnormalData(){
         patrolInspectionPlanSonService.addPatrolInspectionAbnormalData();
-        return ApiResult.success();
     }