| | |
| | | package com.xcong.excoin.modules.contract.controller; |
| | | |
| | | import com.xcong.excoin.common.LoginUserUtils; |
| | | import com.xcong.excoin.common.response.Result; |
| | | import com.xcong.excoin.modules.contract.parameter.dto.*; |
| | | import com.xcong.excoin.modules.contract.parameter.vo.ContractMoneyInfoVo; |
| | |
| | | import com.xcong.excoin.modules.contract.parameter.vo.OrderListVo; |
| | | import com.xcong.excoin.modules.contract.service.ContractHoldOrderService; |
| | | import com.xcong.excoin.modules.contract.service.ContractOrderService; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.rabbit.producer.OrderProducer; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 0, message = "success", response = HoldOrderListVo.class) |
| | | }) |
| | | // @GetMapping(value = "/findHoldOrderList") |
| | | // public Result findHoldOrderList(@ApiParam(name = "symbol", value = "币种", example = "BTC/USDT") @RequestParam(value = "symbol", required = false) String symbol) { |
| | | // return contractHoldOrderService.findHoldOrderList(symbol, 1); |
| | | // } |
| | | @GetMapping(value = "/findHoldOrderList") |
| | | public Result findHoldOrderList(@ApiParam(name = "symbol", value = "币种", example = "BTC/USDT") @RequestParam(value = "symbol", required = false) String symbol) { |
| | | return contractHoldOrderService.findHoldOrderList(symbol, 1); |
| | | public Result findHoldOrderList(@ApiParam(name = "symbol", value = "币种", example = "BTC/USDT") @RequestParam(value = "symbol") String symbol) { |
| | | return contractHoldOrderService.findHoldOrderList(symbol, 1); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询当前持仓跟单订单列表 -- 轮询") |
| | |
| | | @ApiOperation(value = "全仓模式 - 平仓") |
| | | @PostMapping(value = "/closingOrder") |
| | | public Result closingOrder(@RequestBody @Validated WholeCloseOrderDto wholeCloseOrderDto) { |
| | | return null; |
| | | return contractHoldOrderService.cancelHoldOrder(wholeCloseOrderDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "全仓模式 - 变更仓位类型") |
| | |
| | | return contractHoldOrderService.changePositionType(); |
| | | } |
| | | |
| | | @GetMapping(value = "/findPositionType") |
| | | @ApiModelProperty(value = "全仓模式 -- 获取仓位状态") |
| | | public Result findPositionType() { |
| | | MemberEntity memberEntity = LoginUserUtils.getAppLoginUser(); |
| | | |
| | | return Result.ok("获取成功", memberEntity.getContractPositionType()); |
| | | } |
| | | |
| | | } |