| | |
| | | return Result.succeed("success"); |
| | | } |
| | | |
| | | @GetMapping(action + "setStopPrice.action") |
| | | @ApiOperation(value = "设置止盈止损") |
| | | public Result<String> setStopPrice(@RequestParam @NotBlank String orderNo, @RequestParam @NotBlank BigDecimal stopPriceProfit, |
| | | @RequestParam @NotBlank BigDecimal stopPriceLoss) { |
| | | try { |
| | | ContractOrder order = this.contractOrderService.findByOrderNo(orderNo); |
| | | if (order != null && order.getState().equals(ContractOrder.STATE_SUBMITTED)) { |
| | | order.setStopPriceProfit(stopPriceProfit); |
| | | order.setStopPriceLoss(stopPriceLoss); |
| | | contractOrderService.update(order); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("追加保证金异常", e); |
| | | throw new YamiShopBindException("追加保证金异常"); |
| | | } |
| | | return Result.succeed("success"); |
| | | } |
| | | |
| | | /** |
| | | * 一键平仓 |
| | | */ |