OrderController.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. namespace App\Http\Controllers\Order;
  3. use App\Http\Controllers\BaseController;
  4. use App\Http\Logic\Order\OrderLogic;
  5. class OrderController extends BaseController
  6. {
  7. /**
  8. * @SWG\Post(
  9. * path="/order/list",
  10. * tags={"订单管理"},
  11. * summary="用户订单列表接口",
  12. * description="用户订单列表接口",
  13. * produces={"application/json"},
  14. * @SWG\Parameter(
  15. * name="page",
  16. * in="query",
  17. * description="第几页",
  18. * type="string"
  19. * ),
  20. * @SWG\Parameter(
  21. * name="page_size",
  22. * in="query",
  23. * description="每页数量",
  24. * type="string"
  25. * ),
  26. * @SWG\Parameter(
  27. * name="order_platform_son_type",
  28. * in="query",
  29. * description="订单类型(0未全部)",
  30. * type="string"
  31. * ),
  32. * @SWG\Parameter(
  33. * name="order_status",
  34. * in="query",
  35. * description="订单状态(1未结算2已结算(0为全部))",
  36. * type="string"
  37. * ),
  38. * @SWG\Response(
  39. * response="200",
  40. * description="success",
  41. * @SWG\Schema(ref="#/definitions/GetOrderListResultBean")
  42. * ),
  43. * @SWG\Response(
  44. * response="403",
  45. * description="fail",
  46. * @SWG\Schema(ref="#/definitions/ErrorBean")
  47. * )
  48. * )
  49. */
  50. public function getOrderList()
  51. {
  52. $datas = OrderLogic::getOrderListLogic();
  53. return $this->success($datas);
  54. }
  55. /**
  56. * @SWG\Get(
  57. * path="/order/type/list",
  58. * tags={"订单管理"},
  59. * summary="订单类型接口",
  60. * description="订单类型接口",
  61. * produces={"application/json"},
  62. * @SWG\Response(
  63. * response="200",
  64. * description="success",
  65. * @SWG\Schema(
  66. * @SWG\Property(
  67. * property="order_platform_son_type",
  68. * type="string",
  69. * description="订单类型ID"
  70. * ),
  71. * @SWG\Property(
  72. * property="type_name",
  73. * type="string",
  74. * description="类型名称"
  75. * )
  76. * )
  77. * ),
  78. * @SWG\Response(
  79. * response="403",
  80. * description="fail",
  81. * @SWG\Schema(ref="#/definitions/ErrorBean")
  82. * )
  83. * )
  84. */
  85. public function getOrderTypeList()
  86. {
  87. $datas = OrderLogic::getOrderTypeListLogic();
  88. return $this->success($datas);
  89. }
  90. /**
  91. * @SWG\Get(
  92. * path="/order/detail",
  93. * tags={"订单管理"},
  94. * summary="订单详情接口",
  95. * description="订单详情接口",
  96. * @SWG\Parameter(
  97. * name="order_id",
  98. * in="query",
  99. * description="订单ID",
  100. * type="string"
  101. * ),
  102. * produces={"application/json"},
  103. * @SWG\Response(
  104. * response="200",
  105. * description="success",
  106. * @SWG\Schema(
  107. * @SWG\Property(
  108. * property="order_number",
  109. * type="string",
  110. * description="订单编号"
  111. * ),
  112. * @SWG\Property(
  113. * property="order_platform_son_type",
  114. * type="string",
  115. * description="平台"
  116. * ),
  117. * @SWG\Property(
  118. * property="order_price",
  119. * type="string",
  120. * description="订单金额"
  121. * ),
  122. * @SWG\Property(
  123. * property="order_commission",
  124. * type="string",
  125. * description="预估收益"
  126. * ),
  127. * @SWG\Property(
  128. * property="order_status",
  129. * type="string",
  130. * description="订单状态(0未支付1已支付2已收获3已结算4全部退款或风控5部分退款6已取消)"
  131. * ),
  132. * @SWG\Property(
  133. * property="order_pay_at",
  134. * type="string",
  135. * description="支付时间"
  136. * )
  137. * )
  138. * ),
  139. * @SWG\Response(
  140. * response="403",
  141. * description="fail",
  142. * @SWG\Schema(ref="#/definitions/ErrorBean")
  143. * )
  144. * )
  145. */
  146. public function getOrderDetail()
  147. {
  148. $datas = OrderLogic::getOrderDetailLogic();
  149. return $this->success($datas);
  150. }
  151. }