| | |
| | | } |
| | | |
| | | @ApiOperation(value = "用户订单列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = OrderListVo.class) |
| | | }) |
| | | @PostMapping(value = "/orderList") |
| | | public Result orderList(@RequestBody OrderListDto orderListDto) { |
| | | IPage<OrderListVo> page = otcOrderService.findOrderListInPage(orderListDto); |
| | |
| | | throw new GlobalException("委托单不存在"); |
| | | } |
| | | |
| | | if (member.getId().equals(entrustOrder.getMemberId())) { |
| | | throw new GlobalException("不能购买自己的委托单"); |
| | | } |
| | | |
| | | if (!OtcEntrustOrder.ORDER_TYPE_S.equals(entrustOrder.getOrderType())) { |
| | | throw new GlobalException("无法购买"); |
| | | } |
| | |
| | | throw new GlobalException("委托单不存在"); |
| | | } |
| | | |
| | | if (member.getId().equals(entrustOrder.getMemberId())) { |
| | | throw new GlobalException("不能购买自己的委托单"); |
| | | } |
| | | |
| | | if (!OtcEntrustOrder.ORDER_TYPE_B.equals(entrustOrder.getOrderType())) { |
| | | throw new GlobalException("无法出售"); |
| | | } |
| | |
| | | a.order_no orderNo, |
| | | a.unit_price unitPrice, |
| | | a.coin_amount amount, |
| | | a.status status, |
| | | a.total_amount totalAmount, |
| | | a.create_time creatTime, |
| | | a.order_type orderType, |