ActivityRebateOrderNController.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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\models\ActivityRebateOrderN;
  12. use app\models\ActivityRebateOrderNLog;
  13. use app\modules\admin\models\ActivityRebateOrderNForm;
  14. class ActivityRebateOrderNController extends BaseController
  15. {
  16. public function actionTest()
  17. {
  18. $order_id = '6839';
  19. $res = ActivityRebateOrderNLog::priceInfoOrderId($order_id);
  20. return $this->asJson($res);
  21. }
  22. /**
  23. * @return \yii\web\Response
  24. * 获取列表
  25. */
  26. public function actionList()
  27. {
  28. $form = new ActivityRebateOrderNForm();
  29. $form->store_id = get_store_id();
  30. $form->attributes = all_params();
  31. $res = $form->search();
  32. return $this->asJson($res);
  33. }
  34. /**
  35. * @return \yii\web\Response
  36. * 保存信息
  37. */
  38. public function actionSave()
  39. {
  40. $form = new ActivityRebateOrderNForm();
  41. $form->store_id = get_store_id();
  42. $form->attributes = all_params();
  43. $res = $form->save();
  44. return $this->asJson($res);
  45. }
  46. public function actionSaveKey()
  47. {
  48. $form = new ActivityRebateOrderNForm();
  49. $form->store_id = get_store_id();
  50. $form->attributes = all_params();
  51. $res = $form->saveKey();
  52. return $this->asJson($res);
  53. }
  54. /**
  55. * @return \yii\web\Response
  56. * 获取信息
  57. */
  58. public function actionGetInfo()
  59. {
  60. $form = new ActivityRebateOrderNForm();
  61. $form->store_id = get_store_id();
  62. $form->attributes = all_params();
  63. $res = $form->getInfo();
  64. return $this->asJson($res);
  65. }
  66. /**
  67. * @return \yii\web\Response
  68. * 修改状态
  69. */
  70. public function actionDel()
  71. {
  72. $form = new ActivityRebateOrderNForm();
  73. $form->attributes = all_params();
  74. $res = $form->del();
  75. return $this->asJson($res);
  76. }
  77. public function actionLogList()
  78. {
  79. $form = new ActivityRebateOrderNForm();
  80. $form->status = get_params('status', -1);
  81. $form->activity_id = get_params('activity_id');
  82. $form->goods_name = get_params('goods_name');
  83. $form->user_name = get_params('user_name');
  84. $form->order_no = get_params('order_no');
  85. $form->store_id = get_store_id();
  86. $res = $form->logList();
  87. return $this->asJson($res);
  88. }
  89. }