修改remote接口
parent
818b002fc9
commit
9953aab7bd
|
@ -1,5 +1,6 @@
|
||||||
package com.god.base.remote;
|
package com.god.base.remote;
|
||||||
|
|
||||||
|
import com.god.base.common.domain.Fence;
|
||||||
import com.god.base.remote.factory.RemoteCarFallbackFactory;
|
import com.god.base.remote.factory.RemoteCarFallbackFactory;
|
||||||
import com.god.base.server.common.domain.Car;
|
import com.god.base.server.common.domain.Car;
|
||||||
import com.god.common.core.constant.SecurityConstants;
|
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.security.annotation.RequiresPermissions;
|
||||||
import com.god.common.system.remote.factory.RemoteLogFallbackFactory;
|
import com.god.common.system.remote.factory.RemoteLogFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestHeader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆服务
|
* 车辆服务
|
||||||
|
@ -23,5 +22,8 @@ public interface RemoteCarService {
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/car/list/{vinId}")
|
@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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.god.base.remote.factory;
|
package com.god.base.remote.factory;
|
||||||
|
|
||||||
|
import com.god.base.common.domain.Fence;
|
||||||
import com.god.base.remote.RemoteCarService;
|
import com.god.base.remote.RemoteCarService;
|
||||||
import com.god.base.server.common.domain.Car;
|
import com.god.base.server.common.domain.Car;
|
||||||
import com.god.common.core.domain.Result;
|
import com.god.common.core.domain.Result;
|
||||||
|
@ -25,7 +26,12 @@ public class RemoteCarFallbackFactory implements FallbackFactory<RemoteCarServic
|
||||||
|
|
||||||
return new RemoteCarService() {
|
return new RemoteCarService() {
|
||||||
@Override
|
@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());
|
return Result.error("保存操作日志失败:" + cause.getMessage());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
com.god.base.remote.factory.RemoteCarFallbackFactory
|
Loading…
Reference in New Issue