PackageOrder.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\admin\controller\package;
  3. use app\admin\controller\BaseController;
  4. use app\admin\server\package\PackageOrderServer;
  5. class PackageOrder extends BaseController
  6. {
  7. /**
  8. * Notes:获取订单列表
  9. * @return \support\Response
  10. * User: QJF
  11. * Date: 2022/9/20
  12. */
  13. public function getPackageOrderList()
  14. {
  15. [$page, $limit] = $this->getPage();
  16. $keywords = $this->request->get('keywords');
  17. $result = PackageOrderServer::getPackageOrderList($page, $limit,$keywords);
  18. return json_success($result, '成功');
  19. }
  20. /**
  21. * Notes:订单详情
  22. * @return \support\Response
  23. * User: QJF
  24. * Date: 2022/9/20
  25. */
  26. public function infoPackageOrder()
  27. {
  28. $order_id = $this->request->get('order_id');
  29. $result = PackageOrderServer::packageOrderInfo($order_id);
  30. if ($result){
  31. return json_success($result, '获取成功');
  32. }else{
  33. throw new \Exception('获取失败!');
  34. }
  35. }
  36. /**
  37. * Notes:修改订单支付状态
  38. * @return \support\Response
  39. * User: YCP
  40. * Date: 2022/11/28
  41. */
  42. public function updatePayStatus()
  43. {
  44. $order_id = $this->request->post('order_id');
  45. $order_pay_status = $this->request->post('order_pay_status');
  46. if(!$order_id){
  47. throw new \Exception('订单ID不能为空');
  48. }
  49. $result = PackageOrderServer::updatePayStatus($order_id, $order_pay_status);
  50. return json_success($result, '修改成功');
  51. }
  52. }