OrderListForm.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\alliance\models;
  8. use app\constants\OptionSetting;
  9. use app\models\Goods;
  10. use app\models\GoodsBook;
  11. use app\models\Mch;
  12. use app\models\Md;
  13. use app\models\Option;
  14. use app\models\Order;
  15. use app\models\Store;
  16. use app\models\OrderDetail;
  17. use app\models\OrderRefund;
  18. use app\models\User;
  19. use app\models\UserCoupon;
  20. use app\models\SaasCoupon;
  21. use app\modules\alliance\models\order\OrderForm;
  22. use app\utils\Delivery\Delivery;
  23. use yii\base\BaseObject;
  24. use yii\data\Pagination;
  25. use app\utils\Notice\NoticeAction;
  26. use yii\helpers\Json;
  27. use app\models\DeliveryInfo;
  28. class OrderListForm extends OrderForm
  29. {
  30. public $store_id;
  31. public $user_id;
  32. public $saas_id;
  33. public $status;
  34. public $delivery_status;
  35. public $delivery_type;
  36. public $page;
  37. public $limit = 20;
  38. public $order_id;
  39. public $order_no;
  40. public $key;
  41. public $nowlatitude;
  42. public $nowlongitude;
  43. public function rules()
  44. {
  45. return [
  46. [['page', 'limit', 'status', 'delivery_type','saas_id'], 'integer'],
  47. [['page'], 'default', 'value' => 1],
  48. [['limit'], 'default', 'value' => 20],
  49. [['order_no'], 'default', 'value' => 0],
  50. [['order_id', 'key'],'trim'],
  51. [['nowlongitude', 'nowlatitude'], 'safe'],
  52. ];
  53. }
  54. public function search()
  55. {
  56. if (!$this->validate()) {
  57. return [
  58. 'code' => 1,
  59. 'msg' => $this->getErrorSummary(false)[0],
  60. ];
  61. }
  62. $this->saas_id = get_saas_user_id();
  63. $query = Order::find()->where([
  64. 'is_delete' => 0,
  65. //'store_id' => $this->store_id,
  66. 'saas_id' => $this->saas_id,
  67. 'user_delete' => 0
  68. ]);
  69. if (isset($this->status) && $this->status > -1) {
  70. $query->andWhere([
  71. '<>', 'trade_status', Order::ORDER_FLOW_CANCEL
  72. ]);
  73. }
  74. if ($this->status == 0) {//待付款
  75. $query->andWhere([
  76. 'is_pay' => Order::IS_PAY_FALSE,
  77. ])->andWhere(['!=', 'pay_type' , 2])->andWhere(['!=', 'trade_status', 1]);
  78. }
  79. if ($this->status == 1) {//待发货
  80. $query->andWhere([
  81. 'or',
  82. ['trade_status' => Order::ORDER_FLOW_NO_SEND],
  83. ['pay_type' => 2, 'trade_status' => Order::ORDER_FLOW_DEFAULT]
  84. ])->andWhere(['or', ['is_pay' => 1], ['pay_type' => 2]]);
  85. }
  86. if ($this->status == 2) {//待收货
  87. $query->andWhere([
  88. 'trade_status' => Order::ORDER_FLOW_SEND,
  89. ]);
  90. }
  91. if ($this->status == 3) {//已完成
  92. $query->andWhere([
  93. 'trade_status' => Order::ORDER_FLOW_CONFIRM,
  94. ]);
  95. }
  96. if ($this->status == 4) {//售后订单
  97. return $this->getRefundList();
  98. }
  99. $query->andWhere(['is_recycle' => 0]);
  100. $count = $query->count();
  101. $pagination = new Pagination(['totalCount' => $count, 'page' => $this->page - 1, 'pageSize' => $this->limit]);
  102. /* @var Order[] $list */
  103. $list = $query->limit($pagination->limit)->offset($pagination->offset)->orderBy('created_at DESC')->all();
  104. $new_list = [];
  105. $pay_type_list = OrderForm::getPayType();
  106. foreach ($list as $order) {
  107. // 预约订单超过15分钟未支付自动取消
  108. if (time() - $order->created_at > 15 * 60 && $order->trade_status != Order::ORDER_FLOW_CANCEL && $order->is_pay == 0 && $order->pay_type != 2) {
  109. $order->trade_status = Order::ORDER_FLOW_CANCEL;
  110. $order->updated_at = time();
  111. $order->save();
  112. SaasCoupon::updateAll(['is_use' => 0], ['id' => $order->user_coupon_id]);
  113. }
  114. $order_detail_list = OrderDetail::findAll(['order_id' => $order->id, 'is_delete' => 0]);
  115. $goods_list = [];
  116. foreach ($order_detail_list as $order_detail) {
  117. $goods = Json::encode($order_detail->goods_info);
  118. if (!$goods) {
  119. continue;
  120. }
  121. $goods_pic = isset($order_detail->pic) ? $order_detail->pic : $goods['cover_pic'];
  122. $goods_list[] = (object)[
  123. 'goods_id' => isset($goods['id']) ? $goods['id'] : $order_detail->goods_id,
  124. 'goods_pic' => $goods_pic,
  125. 'goods_name' => $order_detail->goods_name,
  126. 'num' => $order_detail->num,
  127. 'price' => $order_detail->total_price,
  128. 'attr_list' => json_decode($order_detail->attr),
  129. ];
  130. }
  131. $qrcode = null;
  132. $mch = [
  133. 'id' => 0,
  134. 'name' => '平台自营',
  135. 'logo' => '',
  136. ];
  137. $orderRefund = OrderRefund::find()->where(['store_id' => $order->store_id, 'order_id' => $order->id])->exists();
  138. $deliveryInfo = null;
  139. if ($order->is_delivery == 1) {
  140. $deliveryInfo = DeliveryInfo::find()->where(['order_no' => $order->order_no])->one();
  141. }
  142. $is_order_refund = $order_refund_enable = 0;
  143. if ($orderRefund) {
  144. $is_order_refund = 1;
  145. } else {
  146. $is_order_refund = 0;
  147. }
  148. if ($order->is_pay == 1 && ($order->trade_status == Order::ORDER_FLOW_SEND || $order->trade_status == Order::ORDER_FLOW_CONFIRM)) {
  149. $order_refund_enable = 1;
  150. } else {
  151. $order_refund_enable = 0;
  152. }
  153. if ($order->trade_status == Order::ORDER_FLOW_CONFIRM && intval($order->is_sale) === 0) {
  154. // $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id);
  155. // if ((time() - $order->confirm_time) > $after_sale_time['value'] * 86400) {//超过可售后时间
  156. $order_refund_enable = 1;
  157. // }
  158. }
  159. $food_pay_type = [];
  160. $store = Store::findOne($order->store_id);
  161. if (!empty($store)) {
  162. if ($order->md_id > 0) {
  163. $md = Md::findOne($order->md_id);
  164. $food_payment = $md->food_payment;
  165. } else {
  166. $store = Store::findOne($order->store_id);
  167. $food_payment = $store->food_payment;
  168. }
  169. $food_pay_list = [];
  170. if (!empty($food_payment)) {
  171. $food_pay_type = Json::decode($food_payment);
  172. foreach ($food_pay_type as $key => &$value) {
  173. if ($value['key'] == 'friend') {
  174. $value['payment'] = 7;
  175. if(!$value['name']){
  176. $value['name'] = "朋友代付";
  177. }
  178. }
  179. if ($value['key'] == 'alipay') {
  180. $value['payment'] = 4;
  181. if(!$value['name']){
  182. $value['name'] = "支付宝支付";
  183. }
  184. }
  185. if ($value['key'] == 'wechat') {
  186. $value['payment'] = 1;
  187. if(!$value['name']){
  188. $value['name'] = "微信支付";
  189. }
  190. }
  191. if ($value['key'] == 'huodao') {
  192. $value['payment'] = 2;
  193. if(!$value['name']){
  194. $value['name'] = "货到付款";
  195. }
  196. // 商盟去掉货到付款
  197. unset($food_pay_type[$key]);
  198. }
  199. }
  200. $food_pay_list = $food_pay_type;
  201. }
  202. foreach ($food_pay_list as $k => $val) {
  203. if (($val['payment'] == 4 && is_wechat_platform()) || ($val['payment'] == 4 && intval($val['value']) === 0)) {
  204. unset($food_pay_list[$k]);
  205. }
  206. if (($val['payment'] == 1 && is_alipay_platform()) || ($val['payment'] == 1 && intval($val['value']) === 0)) {
  207. unset($food_pay_list[$k]);
  208. }
  209. if ($val['payment'] == 7 && intval($val['value']) === 0) {
  210. unset($food_pay_list[$k]);
  211. }
  212. }
  213. $food_pay_list = array_values($food_pay_list);
  214. // 点餐支付方式
  215. $food_pay_type = $food_pay_list;
  216. }
  217. $storeInfo = Store::find()->where(['id' => $order->store_id])->asArray()->one();
  218. $new_list[] = (object)[
  219. 'is_order_refund' => $is_order_refund,
  220. 'order_refund_enable' => $order_refund_enable,
  221. 'order_id' => $order->id,
  222. 'order_no' => $order->order_no,
  223. 'add_time' => $order->created_at,
  224. 'goods_list' => $goods_list,
  225. 'total_price' => $order->total_price,
  226. 'pay_price' => sprintf("%1.2f", $order->pay_price),
  227. 'is_pay' => $order->is_pay,
  228. 'is_comment' => $order->is_comment,
  229. 'is_offline' => $order->is_offline,
  230. 'qrcode' => $qrcode,
  231. 'offline_qrcode' => $order->offline_qrcode,
  232. 'express' => $order->express,
  233. 'mch' => $mch,
  234. 'type' => $order->type,
  235. 'pay_type' => $order->pay_type,
  236. 'refund' => $orderRefund,
  237. 'apply_delete' => $order->apply_delete,
  238. 'trade_status' => $order->trade_status,
  239. 'delivery_fee' => $deliveryInfo ? $deliveryInfo->fee : 0,
  240. 'is_delivery' => $order->is_delivery,
  241. 'order_type' => $order->order_type,
  242. 'store_id' => $storeInfo['id'],
  243. 'store_name' => $storeInfo['name'] ?: '平台自营',
  244. 'store_logo' => $storeInfo['logo'],
  245. 'pay_type_list' => $food_pay_type ?: $pay_type_list
  246. ];
  247. }
  248. return [
  249. 'code' => 0,
  250. 'msg' => 'success',
  251. 'data' => [
  252. 'row_count' => $count,
  253. 'page_count' => $pagination->pageCount,
  254. 'list' => $new_list,
  255. 'pay_type_list' => $pay_type_list,
  256. 'revoke_tpl'=>'',
  257. 'template_id' => NoticeAction::getSendTamplateId(['order_cancel']),
  258. 'cancel_reason' => Delivery::$validReason
  259. ],
  260. ];
  261. }
  262. private function getRefundList()
  263. {
  264. $query = OrderRefund::find()->alias('or')
  265. ->leftJoin(['od' => OrderDetail::tableName()], 'od.id=or.order_detail_id')
  266. ->leftJoin(['o' => Order::tableName()], 'o.id=or.order_id')
  267. ->where([
  268. 'or.store_id' => $this->store_id,
  269. 'or.user_id' => $this->user_id,
  270. 'or.is_delete' => 0,
  271. 'o.is_delete' => 0,
  272. 'od.is_delete' => 0,
  273. ]);
  274. if($this->order_id){
  275. $query->andWhere(['o.id' => $this->order_id]);
  276. }
  277. $count = $query->count();
  278. $pagination = new Pagination(['totalCount' => $count, 'page' => $this->page - 1, 'pageSize' => $this->limit]);
  279. $list = $query->select('o.id AS order_id,o.order_no,or.id AS order_refund_id,od.goods_id,or.created_at,od.num,od.total_price,od.attr,or.refund_price,or.type,or.status,or.is_agree,or.is_user_send,od.goods_info, od.goods_name, od.pic')
  280. ->limit($pagination->limit)->offset($pagination->offset)->orderBy('or.id DESC')->asArray()->all();
  281. $new_list = [];
  282. foreach ($list as $item) {
  283. $goods = Json::decode($item['goods_info']) ?:Goods::find()->where(['id' => $item['goods_id']])->asArray()->one();
  284. if (!$goods) {
  285. continue;
  286. }
  287. $new_list[] = (object)[
  288. 'order_id' => intval($item['order_id']),
  289. 'order_no' => $item['order_no'],
  290. 'goods_list' => [(object)[
  291. 'goods_id' => intval($goods->id),
  292. 'goods_pic' => $item['pic'] ?: $goods['cover_pic'],
  293. 'goods_name' => $item['goods_name'],
  294. 'num' => intval($item['num']),
  295. 'price' => doubleval(sprintf('%.2f', $item['total_price'])),
  296. 'attr_list' => json_decode($item['attr']),
  297. ]],
  298. 'addtime' => date('Y-m-d H:i', $item['created_at']),
  299. 'refund_price' => doubleval(sprintf('%.2f', $item['refund_price'])),
  300. 'refund_type' => $item['type'],
  301. 'refund_status' => $item['status'],
  302. 'order_refund_id' => $item['order_refund_id'],
  303. 'is_agree' => $item['is_agree'],
  304. 'is_user_send' => $item['is_user_send'],
  305. ];
  306. }
  307. return [
  308. 'code' => 0,
  309. 'msg' => 'success',
  310. 'data' => [
  311. 'row_count' => $count,
  312. 'page_count' => $pagination->pageCount,
  313. 'list' => $new_list,
  314. ],
  315. ];
  316. }
  317. public function getNewRefundList()
  318. {
  319. $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id);
  320. $new_list = [];
  321. if (!$this->status) {
  322. $query = Order::find()->alias('o')
  323. ->where([
  324. //'o.store_id' => $this->store_id,
  325. 'o.saas_id' => $this->saas_id,
  326. 'o.is_delete' => 0,
  327. ]);
  328. // if (get_md_id()) {
  329. // $query->andWhere(['o.md_id' => get_md_id()]);
  330. // }
  331. $query->andWhere(['o.trade_status' => Order::ORDER_FLOW_CONFIRM]);
  332. //$query->andWhere(['>', 'o.confirm_time', time() - $after_sale_time['value'] * 86400]); ??
  333. $list = $query->select('o.pay_price, o.confirm_time, o.id AS order_id,o.order_no,o.created_at')->orderBy('o.id DESC')->asArray()->all();
  334. foreach ($list as $item) {
  335. $detail_goods = OrderDetail::find()->where(['order_id' => $item['order_id'], 'is_refund' => 0])->asArray()->all();
  336. if (empty($detail_goods)) {
  337. continue;
  338. }
  339. $detail_goods = OrderDetail::find()->where(['order_id' => $item['order_id']])->asArray()->all();
  340. $order_data = [
  341. 'order_id' => intval($item['order_id']),
  342. 'order_no' => $item['order_no'],
  343. 'pay_price' => $item['pay_price'],
  344. 'goods_list' => [],
  345. 'addtime' => date('Y-m-d H:i', $item['created_at']),
  346. 'refund_price' => isset($item['refund_price']) ? doubleval(sprintf('%.2f', $item['refund_price'])) : 0,
  347. 'refund_type' => isset($item['type']) ? $item['type'] : 0,
  348. 'refund_status' => isset($item['status']) ? $item['status'] : 0,
  349. 'order_refund_id' => isset($item['order_refund_id']) ? $item['order_refund_id'] : 0,
  350. 'is_agree' => isset($item['is_agree']) ? $item['is_agree'] : 0,
  351. 'is_user_send' => isset($item['is_user_send']) ? $item['is_user_send'] : 0,
  352. ];
  353. $goods_list = [];
  354. foreach ($detail_goods as $detail) {
  355. $goods_list[] = [
  356. 'goods_id' => intval($detail['goods_id']),
  357. 'goods_pic' => $detail['pic'],
  358. 'goods_name' => $detail['goods_name'],
  359. 'num' => intval($detail['num']),
  360. 'price' => doubleval(sprintf('%.2f', $detail['total_price'])),
  361. 'attr_list' => json_decode($detail['attr']),
  362. ];
  363. }
  364. $order_data['goods_list'] = $goods_list;
  365. $new_list[] = $order_data;
  366. }
  367. }
  368. // 处理中 或者 已完成
  369. if ($this->status == 1 || $this->status == 2) {
  370. $query = OrderRefund::find()->alias('or')
  371. ->leftJoin(['o' => Order::tableName()], 'o.id=or.order_id')
  372. ->where([
  373. //'or.store_id' => $this->store_id,
  374. 'or.user_id' => $this->saas_id,
  375. 'or.is_delete' => 0,
  376. 'o.is_delete' => 0,
  377. 'or.user_delete' => 0
  378. ]);
  379. // if (get_md_id()) {
  380. // $query->andWhere(['or.md_id' => get_md_id()]);
  381. // }
  382. if ($this->status == 1) {
  383. $query->andWhere(['or.status' => OrderRefund::STATUS_IN, 'or.is_user_cancel' => 0]);
  384. }
  385. if ($this->status == 2) {
  386. $query->andWhere(['or', ['or.is_user_cancel' => 1], ['in', 'or.status', OrderRefund::$is_handle_status]]);
  387. }
  388. $list = $query->select('or.is_user_cancel, or.order_detail_id,o.pay_price, o.confirm_time, o.id AS order_id,o.order_no,or.id AS order_refund_id,or.created_at,or.refund_price,or.type,or.status,or.is_agree,or.is_user_send')->orderBy('or.id DESC')->asArray()->all();
  389. if (!empty($list)) {
  390. foreach ($list as $item) {
  391. $order_data = [
  392. 'is_user_cancel' => intval($item['is_user_cancel']),
  393. 'order_id' => intval($item['order_id']),
  394. 'order_no' => $item['order_no'],
  395. 'pay_price' => $item['pay_price'],
  396. 'goods_list' => [],
  397. 'addtime' => date('Y-m-d H:i', $item['created_at']),
  398. 'refund_price' => isset($item['refund_price']) ? doubleval(sprintf('%.2f', $item['refund_price'])) : 0,
  399. 'refund_type' => isset($item['type']) ? $item['type'] : 0,
  400. 'refund_status' => isset($item['status']) ? $item['status'] : 0,
  401. 'order_refund_id' => isset($item['order_refund_id']) ? $item['order_refund_id'] : 0,
  402. 'is_agree' => isset($item['is_agree']) ? $item['is_agree'] : 0,
  403. 'is_user_send' => isset($item['is_user_send']) ? $item['is_user_send'] : 0,
  404. ];
  405. $detail_id = Json::decode($item['order_detail_id']);
  406. $detail_goods = OrderDetail::find()->where(['order_id' => $item['order_id'], 'is_refund' => 1])->andWhere(['in', 'id', $detail_id])->asArray()->all();
  407. $goods_list = [];
  408. $price = 0;
  409. foreach ($detail_goods as $detail) {
  410. $goods_list[] = [
  411. 'goods_id' => intval($detail['goods_id']),
  412. 'goods_pic' => $detail['pic'],
  413. 'goods_name' => $detail['goods_name'],
  414. 'num' => intval($detail['num']),
  415. 'price' => doubleval(sprintf('%.2f', $detail['total_price'])),
  416. 'attr_list' => json_decode($detail['attr']),
  417. 'is_refund' => $detail['is_refund']
  418. ];
  419. $price += $detail['total_price'];
  420. }
  421. $order_data['pay_price'] = $price;
  422. $order_data['goods_list'] = $goods_list;
  423. $new_list[] = $order_data;
  424. }
  425. }
  426. }
  427. $data = array_slice($new_list, ($this->page - 1) * $this->limit, $this->limit);
  428. return [
  429. 'code' => 0,
  430. 'msg' => 'success',
  431. 'data' => [
  432. 'row_count' => count($new_list),
  433. 'page_count' => ceil(count($new_list) / $this->limit),
  434. 'list' => $data,
  435. ],
  436. ];
  437. }
  438. public static function getCountData($saas_id)
  439. {
  440. $form = new OrderListForm();
  441. $form->limit = 1;
  442. //$form->store_id = $store_id;
  443. $form->saas_id = $saas_id;
  444. $data = [];
  445. $form->status = -1;
  446. $res = $form->searchOrderCount();
  447. $data['all'] = $res;
  448. $form->status = 0;
  449. $res = $form->searchOrderCount();
  450. $data['status_0'] = $res;
  451. $form->status = 1;
  452. $res = $form->searchOrderCount();
  453. $data['status_1'] = $res;
  454. $form->status = 2;
  455. $res = $form->searchOrderCount();
  456. $data['status_2'] = $res;
  457. $form->status = 3;
  458. $res = $form->searchOrderCount();
  459. $data['status_3'] = $res;
  460. return $data;
  461. }
  462. /**
  463. * 获取订单数方法
  464. * @return array|int|string
  465. */
  466. public function searchOrderCount()
  467. {
  468. $query = Order::find()->where([
  469. 'is_delete' => 0,
  470. 'user_delete' => 0,
  471. //'store_id' => $this->store_id,
  472. 'saas_id' => $this->saas_id,
  473. ]);
  474. if (isset($this->status) && $this->status > -1) {
  475. $query->andWhere([
  476. '<>', 'trade_status', Order::ORDER_FLOW_CANCEL
  477. ]);
  478. }
  479. if ($this->status == 0) {//待付款
  480. $query->andWhere([
  481. 'is_pay' => Order::IS_PAY_FALSE,
  482. ])->andWhere(['!=', 'pay_type' , 2]);
  483. }
  484. if ($this->status == 1) {//待发货
  485. $query->andWhere([
  486. 'trade_status' => Order::ORDER_FLOW_NO_SEND,
  487. ])->andWhere(['or', ['is_pay' => 1], ['pay_type' => 2]]);
  488. }
  489. if ($this->status == 2) {//待收货
  490. $query->andWhere([
  491. 'trade_status' => Order::ORDER_FLOW_SEND,
  492. ]);
  493. }
  494. if ($this->status == 3) {//已完成
  495. $query->andWhere([
  496. 'trade_status' => Order::ORDER_FLOW_CONFIRM,
  497. ]);
  498. }
  499. $query->andWhere(['is_recycle' => 0]);
  500. return $query->count();
  501. }
  502. //获取积分兑换商品列表
  503. public function getIntegralList(){
  504. $store_id = $this->store_id;
  505. if ($store_id <= 0) {
  506. $store_id = [0, -1];
  507. }
  508. $query = Order::find()->alias('o')->leftJoin(["d"=>OrderDetail::tablename()],'o.id = d.order_id');
  509. $query->where([
  510. 'o.is_delete' => 0,
  511. 'o.user_delete' => 0,
  512. 'o.store_id' => $store_id,
  513. 'o.saas_id' => $this->user_id,
  514. 'o.order_type' => 7,
  515. 'o.is_pay' => 1
  516. ]);
  517. $query->select("o.id,o.pay_price,o.order_no,o.integral_price,o.trade_status,d.goods_name,d.goods_id,d.num,d.total_price,d.integral_price,d.pic,d.goods_info");
  518. $pagination = pagination_make($query);
  519. $list = $pagination['list'];
  520. foreach($list as &$val){
  521. $val['goods_info'] = json_decode($val['goods_info'],true);
  522. }
  523. return [
  524. 'code' => 0,
  525. 'msg' => 'success',
  526. 'data' => [
  527. 'data' => $list,
  528. 'pageNo' => $pagination['pageNo'],
  529. 'totalCount' => $pagination['totalCount'],
  530. ],
  531. ];
  532. }
  533. }