diff --git a/car-base-remote/src/main/java/com/god/base/remote/RemoteCarService.java b/car-base-remote/src/main/java/com/god/base/remote/RemoteCarService.java index 9cd58b7..3fcd086 100644 --- a/car-base-remote/src/main/java/com/god/base/remote/RemoteCarService.java +++ b/car-base-remote/src/main/java/com/god/base/remote/RemoteCarService.java @@ -1,5 +1,6 @@ package com.god.base.remote; +import com.god.base.common.domain.Fence; import com.god.base.remote.factory.RemoteCarFallbackFactory; import com.god.base.server.common.domain.Car; import com.god.common.core.constant.SecurityConstants; @@ -8,9 +9,7 @@ import com.god.common.core.domain.Result; import com.god.common.security.annotation.RequiresPermissions; import com.god.common.system.remote.factory.RemoteLogFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.*; /** * 车辆服务 @@ -23,5 +22,8 @@ public interface RemoteCarService { @GetMapping("/car/list/{vinId}") - public Result list(@PathVariable String vinId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + public Result list(@PathVariable String vinId); + + @PostMapping("/baseFence/fenceById") + public Result fenceById(@RequestParam("fenceId") Integer fenceId); } diff --git a/car-base-remote/src/main/java/com/god/base/remote/factory/RemoteCarFallbackFactory.java b/car-base-remote/src/main/java/com/god/base/remote/factory/RemoteCarFallbackFactory.java index 7e840fc..a5a1b14 100644 --- a/car-base-remote/src/main/java/com/god/base/remote/factory/RemoteCarFallbackFactory.java +++ b/car-base-remote/src/main/java/com/god/base/remote/factory/RemoteCarFallbackFactory.java @@ -1,5 +1,6 @@ package com.god.base.remote.factory; +import com.god.base.common.domain.Fence; import com.god.base.remote.RemoteCarService; import com.god.base.server.common.domain.Car; import com.god.common.core.domain.Result; @@ -25,7 +26,12 @@ public class RemoteCarFallbackFactory implements FallbackFactory list(String vinId, String source) { + public Result list(String vinId) { + return Result.error("保存操作日志失败:" + cause.getMessage()); + } + + @Override + public Result fenceById(Integer fenceId) { return Result.error("保存操作日志失败:" + cause.getMessage()); } }; diff --git a/car-base-remote/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/car-base-remote/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..6d2b4cc --- /dev/null +++ b/car-base-remote/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.god.base.remote.factory.RemoteCarFallbackFactory