FreeQueueController.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers;
  8. use app\models\Goods;
  9. use app\models\Option;
  10. use app\constants\OptionSetting;
  11. use app\modules\admin\models\FreeQueueForm;
  12. class FreeQueueController extends BaseController
  13. {
  14. /**
  15. * @return \yii\web\Response
  16. * 获取免单活动列表
  17. */
  18. public function actionList()
  19. {
  20. $form = new FreeQueueForm();
  21. $form->attributes = get_params();
  22. $res = $form->search();
  23. return $this->asJson($res);
  24. }
  25. /**
  26. * @return \yii\web\Response
  27. * 获取活动记录
  28. */
  29. public function actionActivityList()
  30. {
  31. $form = new FreeQueueForm();
  32. $form->attributes = get_params();
  33. $res = $form->searchActivity();
  34. return $this->asJson($res);
  35. }
  36. /**
  37. * @return \yii\web\Response
  38. * 获取活动记录详情
  39. */
  40. public function actionActivityDetailList()
  41. {
  42. $form = new FreeQueueForm();
  43. $form->attributes = get_params();
  44. $res = $form->searchActivityDetail();
  45. return $this->asJson($res);
  46. }
  47. /**
  48. * @return \yii\web\Response
  49. * 获取参与记录
  50. */
  51. public function actionActivityJoin()
  52. {
  53. $form = new FreeQueueForm();
  54. $form->attributes = get_params();
  55. $res = $form->searchJoin();
  56. return $this->asJson($res);
  57. }
  58. /**
  59. * Undocumented function
  60. * @desc: 参与记录详情
  61. */
  62. public function actionActivityJoinDetail()
  63. {
  64. //主键id用key标识并进行获取
  65. $form = new FreeQueueForm();
  66. $form->attributes = get_params();
  67. $res = $form->searchJoinDetail();
  68. return $this->asJson($res);
  69. }
  70. /**
  71. * @return \yii\web\Response
  72. * 保存信息
  73. */
  74. public function actionSave()
  75. {
  76. $form = new FreeQueueForm();
  77. $form->attributes = post_params();
  78. $res = $form->save(post_params());
  79. return $this->asJson($res);
  80. }
  81. /**
  82. * @return \yii\web\Response
  83. * 获取信息
  84. */
  85. public function actionGetInfo()
  86. {
  87. $form = new FreeQueueForm();
  88. $form->attributes = get_params();
  89. $res = $form->getInfo();
  90. return $this->asJson($res);
  91. }
  92. /**
  93. * @return \yii\web\Response
  94. * 修改状态
  95. */
  96. public function actionSetStatus()
  97. {
  98. $form = new FreeQueueForm();
  99. $form->attributes = post_params();
  100. $res = $form->setStatus();
  101. return $this->asJson($res);
  102. }
  103. }