Procházet zdrojové kódy

话费充值记录

xialei před 1 rokem
rodič
revize
2ecdf910e4
2 změnil soubory, kde provedl 19 přidání a 0 odebrání
  1. 18 0
      app/controller/api/store/service/Huafei.php
  2. 1 0
      route/api.php

+ 18 - 0
app/controller/api/store/service/Huafei.php

@@ -105,6 +105,24 @@ class Huafei extends BaseController
105 105
     }
106 106
 
107 107
 
108
+
109
+	//话费充值记录
110
+	public function record(){
111
+		$uid = $this->request->uid();
112
+		[$page, $limit] = $this->getPage();
113
+		$where = [];
114
+		$where[] = ['uid', '=', $uid];
115
+		$query = Db::name("order_huafei");
116
+        $count = $query->where($where)->count();
117
+        $list = $query->page($page, $limit)->where($where)->select()->each(function ($item){
118
+            $item['status']=(int)$item['status'];
119
+            return $item;
120
+        });
121
+		return app('json')->success('获取话费充值记录成功', ['list'=>$list, 'count'=>$count, 'limit'=>$limit, 'page'=>$page]);
122
+	}
123
+
124
+
125
+
108 126
 	//话费充值验证
109 127
 	public function verify($order_number, $money){
110 128
 		$request['mobile'] = $order_number;

+ 1 - 0
route/api.php

@@ -1027,6 +1027,7 @@ Route::group('api/', function () {
1027 1027
     Route::group('huafei', function () {
1028 1028
         Route::post('denomination', '/denomination');
1029 1029
         Route::post('recharge', '/recharge');
1030
+        Route::post('record', '/record');
1030 1031
     })->prefix('api.store.service.Huafei');
1031 1032
 
1032 1033
     //话费充值回调通知