Commit 8a4d8cfc by zhouhaibao

[+]代码修复

1 parent 9b87d80a
......@@ -22,11 +22,6 @@
<groupId>com.glsx</groupId>
<artifactId>rest-admin-feign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
<version>3.1.0</version>
</dependency>
</dependencies>
<build>
......
......@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* @author payu
*/
@FeignClient(name = "platform-charging-server", contextId = "pilecontrol", path = "/api/user/", decode404 = true)
@FeignClient(name = "platform-charging", contextId = "pilecontrol", path = "/api/pilecontrol/", decode404 = true)
public interface PileControlFeignClient {
/**
......
......@@ -117,6 +117,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>
</dependencies>
<build>
......
......@@ -28,6 +28,7 @@ import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
......@@ -40,7 +41,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
@Tag(name = "充电桩开放接口")
@RestController
@RequestMapping(value = "/pilecontro")
@RequestMapping(value = "/api/pilecontro")
@ResponseResultBody
public class PileControlApiController implements PileControlFeignClient {
......@@ -48,7 +49,7 @@ public class PileControlApiController implements PileControlFeignClient {
private UserDemoService userDemoService;
@Override
public Result<Boolean> start(StartBo startBo) {
public Result<Boolean> start(@RequestBody StartBo startBo) {
log.info("启动充电桩请求入参{}", JSONObject.toJSONString(startBo));
StartMachineReq req = new StartMachineReq();
StartMachineReqData data = new StartMachineReqData();
......@@ -71,7 +72,7 @@ public class PileControlApiController implements PileControlFeignClient {
}
@Override
public Result<Boolean> end(EndBo endBo) {
public Result<Boolean> end(@RequestBody EndBo endBo) {
log.info("停止充电桩请求入参{}", JSONObject.toJSONString(endBo));
ShutdownMachineReq req = new ShutdownMachineReq();
ShutdownMachineReqData data = new ShutdownMachineReqData();
......@@ -84,7 +85,7 @@ public class PileControlApiController implements PileControlFeignClient {
}
@Override
public Result<Boolean> pileStart(StartBo startBo) {
public Result<Boolean> pileStart(@RequestBody StartBo startBo) {
AdminSwipeConfirmRsp rsp = new AdminSwipeConfirmRsp();
AdminSwipeConfirmRspData data = new AdminSwipeConfirmRspData();
data.setPileId(Ocpp16Helper.strToBcd(startBo.getPileId(), data.getPileId()));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!