| | |
| | | */ |
| | | @Override |
| | | public String caoZuo() { |
| | | log.info("开始执行操作......"); |
| | | String pos = (String) redisUtils.get(positionsPosKey); |
| | | if (StrUtil.isBlank(pos) || BigDecimal.ZERO.compareTo( new BigDecimal(pos)) <= 0) { |
| | | log.error("未获取到持仓数量"); |
| | | return OrderParamEnums.INIT.getValue(); |
| | | } |
| | | log.info("开始执行操作CaoZuoServiceImpl......"); |
| | | |
| | | // 获取合约执行操作状态 |
| | | String state = (String) redisUtils.get(instrumentsStateKey); |
| | |
| | | return OrderParamEnums.HOLDING.getValue(); |
| | | } |
| | | |
| | | String pos = (String) redisUtils.get(positionsPosKey); |
| | | if (StrUtil.isBlank(pos) || BigDecimal.ZERO.compareTo( new BigDecimal(pos)) <= 0) { |
| | | log.error("未获取到持仓数量"); |
| | | return OrderParamEnums.INIT.getValue(); |
| | | } |
| | | |
| | | String uplStr = (String) redisUtils.get(positionsUplKey); |
| | | if (StrUtil.isBlank(uplStr)){ |
| | | return OrderParamEnums.INIT.getValue(); |