| | |
| | | import com.xcong.excoin.modules.contract.mapper.ContractHoldOrderEntityMapper; |
| | | import com.xcong.excoin.modules.contract.mapper.ContractOrderEntityMapper; |
| | | 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.HoldOrderDetailVo; |
| | | import com.xcong.excoin.modules.contract.parameter.vo.HoldOrderListVo; |
| | | import com.xcong.excoin.modules.contract.parameter.vo.OrderListVo; |
| | | import com.xcong.excoin.modules.contract.parameter.vo.*; |
| | | import com.xcong.excoin.modules.contract.service.ContractHoldOrderService; |
| | | import com.xcong.excoin.modules.member.dao.MemberLevelRateDao; |
| | | import com.xcong.excoin.modules.member.dao.MemberWalletContractDao; |
| | |
| | | if (stopProfitPrice != null) { |
| | | if (newPrice.compareTo(openPrice) > 0) { |
| | | if (stopProfitPrice.compareTo(openPrice) > 0) { |
| | | return Result.fail("止损价必须低于开仓价"); |
| | | return Result.fail("止盈价必须低于开仓价"); |
| | | } |
| | | } else { |
| | | if (stopProfitPrice.compareTo(newPrice) > 0) { |
| | | return Result.fail("止损价必须低于当前价"); |
| | | return Result.fail("止盈价必须低于当前价"); |
| | | } |
| | | } |
| | | } |
| | |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | return Result.ok("设置成功"); |
| | | } |
| | | |
| | | return Result.fail("设置失败"); |
| | | } |
| | | |
| | |
| | | Page<OrderListVo> result = ContractOrderEntityMapper.INSTANCE.pageEntityToPageVo(list); |
| | | return Result.ok(result); |
| | | } |
| | | |
| | | @Override |
| | | public Result findOrderDetailById(Long id) { |
| | | MemberEntity memberEntity = LoginUserUtils.getAppLoginUser(); |
| | | ContractOrderEntity contractOrderEntity = contractOrderDao.selectOrderDetailByIdAndMemberId(id, memberEntity.getId()); |
| | | if (contractOrderEntity == null) { |
| | | return Result.fail("订单不存在"); |
| | | } |
| | | |
| | | OrderDetailVo orderDetailVo = ContractOrderEntityMapper.INSTANCE.entityToDetailVo(contractOrderEntity); |
| | | return Result.ok(orderDetailVo); |
| | | } |
| | | } |