修改remote接口

master
ZhiShuo_Lou 2023-11-27 20:48:13 +08:00
parent 818b002fc9
commit 9953aab7bd
3 changed files with 14 additions and 5 deletions

View File

@ -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<Car> list(@PathVariable String vinId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
public Result<Car> list(@PathVariable String vinId);
@PostMapping("/baseFence/fenceById")
public Result<Fence> fenceById(@RequestParam("fenceId") Integer fenceId);
}

View File

@ -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<RemoteCarServic
return new RemoteCarService() {
@Override
public Result<Car> list(String vinId, String source) {
public Result<Car> list(String vinId) {
return Result.error("保存操作日志失败:" + cause.getMessage());
}
@Override
public Result<Fence> fenceById(Integer fenceId) {
return Result.error("保存操作日志失败:" + cause.getMessage());
}
};

View File

@ -0,0 +1 @@
com.god.base.remote.factory.RemoteCarFallbackFactory