Commit 06bcbf71 by zhouhaibao

[+]增加callback返回

1 parent e09a4395
......@@ -19,10 +19,8 @@ import com.glsx.plat.core.web.Result;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.math.BigDecimal;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
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.ResponseBody;
......@@ -61,8 +59,9 @@ public class PileControlApiController implements PileControlFeignClient {
BigDecimal.valueOf(startBo.getAccountBalance()), 2);
data.setAccountBalance(accountBytes);
req.setData(data);
/* TcpCallback<TcpRsp> tcpRspTcpCallback = ServerMain.getServer().sendSync(req);
TcpRsp tcpRsp = tcpRspTcpCallback.get();*/
TcpCallback<TcpRsp> tcpRspTcpCallback = ServerMain.getServer().sendSync(req);
TcpRsp tcpRsp = tcpRspTcpCallback.get();
log.info("callback返回{}",JSONObject.toJSONString(tcpRsp));
return Result.success(true);
} catch (Exception e) {
e.printStackTrace();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!