企微短剧业务系统

StatisticsController.php 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Models\Report\CustomerServiceData;
  4. use App\Service\DjUserService;
  5. use App\Service\NewStatisticsService;
  6. use App\Service\Report\PublicAccountDataService;
  7. use App\Service\StatisticsService;
  8. use Illuminate\Http\Request;
  9. use App\Http\Controllers\Controller;
  10. class StatisticsController extends Controller
  11. {
  12. /**
  13. * 首页-客户总概
  14. * @param Request $request
  15. * @return
  16. */
  17. public function custTotal(Request $request)
  18. {
  19. $validator = \Validator::make($request->all(),[
  20. 'corpid' => 'required',
  21. ]);
  22. if ($validator->fails()) {
  23. return self::returnValue($validator->getMessageBag(), 1102);
  24. }
  25. $corpid = $request->input('corpid');
  26. $res = StatisticsService::custTotal($corpid);
  27. return self::returnValue($res);
  28. }
  29. public function custTrends(Request $request)
  30. {
  31. $validator = \Validator::make($request->all(),[
  32. 'corpid' => 'required',
  33. 'start' => 'required',
  34. 'end' => 'required',
  35. ]);
  36. if ($validator->fails()) {
  37. return self::returnValue($validator->getMessageBag(), 1102);
  38. }
  39. $corpid = $request->input('corpid');
  40. $start = $request->input('start');
  41. $end = $request->input('end');
  42. $user_id = $request->input('user_id');
  43. $res = StatisticsService::custTrends($corpid, $start, $end, $user_id);
  44. return self::returnValue($res);
  45. }
  46. public function playletPopulariz(Request $request)
  47. {
  48. $validator = \Validator::make($request->all(),[
  49. 'principalName' => 'nullable',
  50. 'start' => 'nullable',
  51. 'end' => 'nullable',
  52. 'page' => 'required|int',
  53. ]);
  54. if ($validator->fails()) {
  55. return self::returnValue($validator->getMessageBag(), 1102);
  56. }
  57. $principalName = $request->input('principalName');
  58. $mpAppId = $request->input('mpAppId');
  59. $start = $request->input('start');
  60. $end = $request->input('end');
  61. $playletId = $request->input('playletId');
  62. $operators = $request->input('operators');
  63. $page = (int)$request->input('page', 1);
  64. $pagesize = (int)$request->input('pagesize', 20);
  65. list($data, $total) = StatisticsService::playletPopulariz($principalName, $mpAppId, $start, $end, $playletId, $operators, $page, $pagesize);
  66. return self::returnPageValue($data, $total, $pagesize, $page);
  67. }
  68. public function momentsPopulariz(Request $request)
  69. {
  70. $validator = \Validator::make($request->all(),[
  71. 'principalName' => 'nullable',
  72. 'start' => 'nullable',
  73. 'end' => 'nullable',
  74. 'page' => 'required|int',
  75. ]);
  76. if ($validator->fails()) {
  77. return self::returnValue($validator->getMessageBag(), 1102);
  78. }
  79. $principalName = $request->input('principalName');
  80. $mpAppId = $request->input('mpAppId');
  81. $start = $request->input('start');
  82. $end = $request->input('end');
  83. $playletId = $request->input('playletId');
  84. $operators = $request->input('operators');
  85. $page = (int)$request->input('page', 1);
  86. $pagesize = (int)$request->input('pagesize', 20);
  87. list($data, $total) = StatisticsService::momentsPopulariz($principalName, $mpAppId, $start, $end, $playletId, $operators, $page, $pagesize);
  88. return self::returnPageValue($data, $total, $pagesize, $page);
  89. }
  90. public function popularizAccounts(Request $request)
  91. {
  92. $validator = \Validator::make($request->all(),[
  93. 'type' => 'nullable|int',
  94. ]);
  95. if ($validator->fails()) {
  96. return self::returnValue($validator->getMessageBag(), 1102);
  97. }
  98. $type = $request->input('type');
  99. $res = StatisticsService::popularizAccounts($type);
  100. return self::returnValue($res);
  101. }
  102. public function popularizPlaylets(Request $request)
  103. {
  104. $validator = \Validator::make($request->all(),[
  105. 'mpAppId' => 'required',
  106. 'type' => 'nullable|int',
  107. ]);
  108. if ($validator->fails()) {
  109. return self::returnValue($validator->getMessageBag(), 1102);
  110. }
  111. $mpAppId = $request->input('mpAppId');
  112. $type = $request->input('type');
  113. $res = StatisticsService::popularizPlaylets($mpAppId, $type);
  114. return self::returnValue($res);
  115. }
  116. public function popularizCompanys(Request $request)
  117. {
  118. $validator = \Validator::make($request->all(),[
  119. 'type' => 'nullable|int',
  120. ]);
  121. if ($validator->fails()) {
  122. return self::returnValue($validator->getMessageBag(), 1102);
  123. }
  124. $type = $request->input('type');
  125. $res = StatisticsService::popularizCompanys($type);
  126. return self::returnValue($res);
  127. }
  128. public function operateDayRetrieve(Request $request)
  129. {
  130. $validator = \Validator::make($request->all(),[
  131. 'start' => 'nullable',
  132. 'end' => 'nullable',
  133. 'app_id' => 'nullable',
  134. 'page' => 'required|int',
  135. ]);
  136. if ($validator->fails()) {
  137. return self::returnValue($validator->getMessageBag(), 1102);
  138. }
  139. $app_id = $request->input('app_id');
  140. $start = $request->input('start');
  141. $end = $request->input('end');
  142. $drama_id = (int)$request->input('drama_id');
  143. $page = (int)$request->input('page', 1);
  144. $pagesize = (int)$request->input('pagesize', 20);
  145. $sysGroupId = $request->input('sys_group_id');
  146. $orderType = $request->input('order_type', 1);
  147. if(1 == $orderType) {
  148. $res = StatisticsService::operateDayRetrieve($app_id, $start, $end, $page, $pagesize, $drama_id, $sysGroupId);
  149. } else {
  150. $res = StatisticsService::operateDayRetrieveAdq($start, $end, $page, $pagesize, $sysGroupId);
  151. }
  152. return self::returnPageValue($res['list'], $res['total'], $pagesize, $page, $res['retrieveColumns']);
  153. }
  154. public function throwPersonData(Request $request)
  155. {
  156. $validator = \Validator::make($request->all(),[
  157. 'start' => 'required',
  158. 'end' => 'required',
  159. 'user_id' => 'nullable|int',
  160. 'drama_id' => 'nullable|int',
  161. ]);
  162. if ($validator->fails()) {
  163. return self::returnValue($validator->getMessageBag(), 1102);
  164. }
  165. $user_id = $request->input('user_id');
  166. $drama_id = $request->input('drama_id');
  167. $start = $request->input('start');
  168. $end = $request->input('end');
  169. $sysGroupId = $request->input('sys_group_id');
  170. $adminId = $request->input('admin_id');
  171. $isSystemAdmin = $request->input('is_system_admin');
  172. $appId = $request->input('app_id'); // 公众号
  173. $launchAccountId = $request->input('launch_account_id');
  174. $closingDate = $request->input('closing_date');
  175. $res = StatisticsService::throwPersonData($start, $end, $user_id, $drama_id, $sysGroupId, $adminId
  176. , $isSystemAdmin, $appId, $launchAccountId, $closingDate);
  177. return self::returnValue($res);
  178. }
  179. public function throwPersonList(Request $request)
  180. {
  181. $validator = \Validator::make($request->all(),[
  182. 'start' => 'required|date',
  183. 'end' => 'required|date',
  184. 'user_id' => 'nullable|int',
  185. 'drama_id' => 'nullable|int',
  186. 'page' => 'required|int',
  187. ]);
  188. if ($validator->fails()) {
  189. return self::returnValue($validator->getMessageBag(), 1102);
  190. }
  191. $user_id = $request->input('user_id');
  192. $drama_id = $request->input('drama_id');
  193. $start = $request->input('start');
  194. $end = $request->input('end');
  195. $page = $request->input('page');
  196. $pageSize = (int)$request->input('pagesize', 10);
  197. $sysGroupId = $request->input('sys_group_id');
  198. $sortField = $request->input('sort_field', 'date');
  199. $adminId = $request->input('admin_id');
  200. $isSystemAdmin = $request->input('is_system_admin');
  201. $appId = $request->input('app_id'); // 公众号
  202. $launchAccountId = $request->input('launch_account_id');
  203. $closingDate = $request->input('closing_date');
  204. list($data, $total) = StatisticsService::throwPersonList($start, $end, $user_id, $drama_id, $page, $pageSize
  205. , $sysGroupId, $sortField, $adminId, $isSystemAdmin, $appId, $launchAccountId, $closingDate);
  206. return self::returnPageValue($data, $total, $pageSize, $page);
  207. }
  208. public function officialTrendTotal(Request $request)
  209. {
  210. $validator = \Validator::make($request->all(),[
  211. 'start' => 'required|date',
  212. 'end' => 'required|date',
  213. 'app_id' => 'nullable|string',
  214. ]);
  215. if ($validator->fails()) {
  216. return self::returnValue($validator->getMessageBag(), 1102);
  217. }
  218. $appId = $request->input('app_id');
  219. $start = $request->input('start');
  220. $end = $request->input('end');
  221. $sysGroupId = $request->input('sys_group_id');
  222. $data = StatisticsService::officialTrendTotal($start, $end, $appId, $sysGroupId);
  223. return self::returnValue($data);
  224. }
  225. public function officialTrendList(Request $request)
  226. {
  227. $validator = \Validator::make($request->all(),[
  228. 'start' => 'required|date',
  229. 'end' => 'required|date',
  230. 'app_id' => 'nullable|string',
  231. ]);
  232. if ($validator->fails()) {
  233. return self::returnValue($validator->getMessageBag(), 1102);
  234. }
  235. $appId = $request->input('app_id');
  236. $start = $request->input('start');
  237. $end = $request->input('end');
  238. $sysGroupId = $request->input('sys_group_id');
  239. $page = $request->input('page', 1);
  240. $pagesize = (int)$request->input('pagesize', 10);
  241. list($data, $total, $day_columns) = StatisticsService::officialTrendList($start, $end, $appId, $page, $pagesize, $sysGroupId);
  242. return self::returnPageValue($data, $total, $pagesize, $page, ['day_columns' => $day_columns]);
  243. }
  244. /**
  245. * 投手数据
  246. * @param Request $request
  247. * @return array
  248. */
  249. public function pitcherData (Request $request)
  250. {
  251. $validator = \Validator::make($request->all(),[
  252. 'st_date' => 'required|date',
  253. 'en_date' => 'required|date',
  254. 'user_id' => 'nullable|int',
  255. ]);
  256. if ($validator->fails()) {
  257. return self::returnValue($validator->getMessageBag(), 1102);
  258. }
  259. $stDate = $request->input('st_date');
  260. $enDate = $request->input('en_date');
  261. $userId = $request->input('user_id');
  262. $page = $request->input('page', 1);
  263. $pageSize = $request->input('page_size', 20);
  264. $sortField = $request->input('sort_field', 'roi');
  265. $sysGroupId = $request->input('sys_group_id');
  266. $adminId = $request->input('admin_id');
  267. $isSystemAdmin = $request->input('is_system_admin');
  268. list($data, $total) = StatisticsService::pitcherData($stDate, $enDate, $userId, $page, $pageSize, $sortField
  269. , $sysGroupId, $adminId, $isSystemAdmin);
  270. return self::returnPageValue($data, $total, $pageSize, $page);
  271. }
  272. public function custTotalNew (Request $request)
  273. {
  274. $validator = \Validator::make($request->all(),[
  275. 'corpid' => 'nullable',
  276. ]);
  277. if ($validator->fails()) {
  278. return self::returnValue($validator->getMessageBag(), 1102);
  279. }
  280. $group_admin_id = $request->input("group_admin_id",0);
  281. $is_system_admin = $request->input("is_system_admin",0);
  282. $sys_group_id = $request->input('sys_group_id');
  283. $corpid = $request->input('corpid');
  284. $res = StatisticsService::custTotalNew($corpid, $group_admin_id, $is_system_admin, $sys_group_id);
  285. return self::returnValue($res);
  286. }
  287. public function custTrendsNew(Request $request)
  288. {
  289. $validator = \Validator::make($request->all(),[
  290. 'corpid' => 'nullable',
  291. 'start' => 'required|date',
  292. 'end' => 'required|date'
  293. ]);
  294. if ($validator->fails()) {
  295. return self::returnValue($validator->getMessageBag(), 1102);
  296. }
  297. $corpid = $request->input('corpid');
  298. $start = $request->input('start');
  299. $end = $request->input('end');
  300. $group_admin_id = $request->input("group_admin_id",0);
  301. $is_system_admin = $request->input("is_system_admin",0);
  302. $sys_group_id = $request->input('sys_group_id');
  303. $res = StatisticsService::custTrendsNew($corpid, $start, $end, $group_admin_id, $is_system_admin, $sys_group_id);
  304. return self::returnValue($res);
  305. }
  306. public function custDataList(Request $request)
  307. {
  308. $validator = \Validator::make($request->all(),[
  309. 'corpid' => 'nullable'
  310. ]);
  311. if ($validator->fails()) {
  312. return self::returnValue($validator->getMessageBag(), 1102);
  313. }
  314. $corpid = $request->input('corpid');
  315. $group_admin_id = $request->input("group_admin_id",0);
  316. $is_system_admin = $request->input("is_system_admin",0);
  317. $sys_group_id = $request->input('sys_group_id');
  318. $res = StatisticsService::custDataList($corpid, $group_admin_id, $is_system_admin, $sys_group_id);
  319. return self::returnValue($res);
  320. }
  321. /**
  322. * 获取累计充值用户【去重】
  323. * */
  324. public function chargeUserUnique(Request $request)
  325. {
  326. $validator = \Validator::make($request->all(),[
  327. 'start_date' => 'required|date',
  328. 'end_date' => 'required|date',
  329. 'app_id' => 'nullable|string',
  330. ]);
  331. if ($validator->fails()) {
  332. return self::returnValue($validator->getMessageBag(), 1102);
  333. }
  334. $appId = $request->input('app_id');
  335. $start = $request->input('start_date');
  336. $end = $request->input('end_date');
  337. $sysGroupId = $request->input('sys_group_id');
  338. # 获取累计充值用户
  339. $count = StatisticsService::chargeUserUnique($appId, $start, $end, $sysGroupId);
  340. return self::returnValue(['count' => $count]);
  341. }
  342. /**
  343. * 获取首日充值用户【去重】
  344. * */
  345. public function firstDayChargeUserUnique(Request $request)
  346. {
  347. $validator = \Validator::make($request->all(),[
  348. 'start_date' => 'required|date',
  349. 'end_date' => 'required|date',
  350. 'app_id' => 'nullable|string',
  351. ]);
  352. if ($validator->fails()) {
  353. return self::returnValue($validator->getMessageBag(), 1102);
  354. }
  355. $appId = $request->input('app_id');
  356. $start = $request->input('start_date');
  357. $end = $request->input('end_date');
  358. $sysGroupId = $request->input('sys_group_id');
  359. # 获取首日充值用户
  360. $count = StatisticsService::firstDayChargeUserUnique($appId, $start, $end, $sysGroupId);
  361. return self::returnValue(['count' => $count]);
  362. }
  363. public function operateDayRetrieveByAccount(Request $request)
  364. {
  365. $validator = \Validator::make($request->all(),[
  366. 'start' => 'nullable',
  367. 'end' => 'nullable',
  368. 'app_id' => 'nullable',
  369. 'page' => 'required|int',
  370. ]);
  371. if ($validator->fails()) {
  372. return self::returnValue($validator->getMessageBag(), 1102);
  373. }
  374. $appId = $request->input('app_id');
  375. $start = $request->input('start');
  376. $end = $request->input('end');
  377. $dramaId = (int)$request->input('drama_id');
  378. $page = (int)$request->input('page', 1);
  379. $pageSize = (int)$request->input('pagesize', 20);
  380. $sysGroupId = $request->input('sys_group_id');
  381. $orderType = $request->input('order_type', 1);
  382. $isSystemAdmin = $request->input('is_system_admin');
  383. $adminId = $request->input('admin_id');
  384. if(1 == $orderType) {
  385. $res = NewStatisticsService::operateDayRetrieveByAccount($appId, $start, $end, $page, $pageSize, $dramaId
  386. , $sysGroupId, $adminId, $isSystemAdmin);
  387. } else {
  388. $res = NewStatisticsService::operateDayRetrieveAdqByAccount($start, $end, $page, $pageSize, $sysGroupId
  389. , $adminId, $isSystemAdmin);
  390. }
  391. return self::returnPageValue($res['list'], $res['total'], $pageSize, $page, $res['retrieveColumns']);
  392. }
  393. public function publicAccountDataList(Request $request)
  394. {
  395. $validator = \Validator::make($request->all(),[
  396. 'start_date' => 'required|date',
  397. 'end_date' => 'required|date',
  398. 'app_id' => 'nullable',
  399. 'closing_date' => 'nullable|date',
  400. 'page' => 'required|numeric',
  401. 'page_size' => 'required|numeric',
  402. 'operator_id' => 'nullable|integer',
  403. 'pitcher_id' => 'nullable|integer',
  404. ]);
  405. if ($validator->fails()) {
  406. return self::returnValue($validator->getMessageBag(), 1102);
  407. }
  408. $params['start_date'] = $request->input('start_date');
  409. $params['end_date'] = $request->input('end_date');
  410. $params['closing_date'] = $request->input('closing_date');
  411. $params['cost_cover_min'] = $request->input('cost_cover_min');
  412. $params['cost_cover_max'] = $request->input('cost_cover_max');
  413. $params['admin_id'] = $request->input('admin_id');
  414. $params['is_system_admin'] = $request->input('is_system_admin');
  415. $params['sys_group_id'] = $request->input('sys_group_id');
  416. $params['operator_id'] = $request->input('operator_id');
  417. $params['pitcher_id'] = $request->input('pitcher_id');
  418. $params['app_id'] = $request->input('app_id');
  419. $page = $request->input('page');
  420. $pageSize = $request->input('page_size');
  421. $sortField = $request->input('sort_field', 'expense_date');
  422. $sortType = $request->input('sort_type', 'desc');
  423. list($count, $list, $retrieveColumns) = PublicAccountDataService::publicAccountDataList($params
  424. , $page, $pageSize, $sortField, $sortType);
  425. return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns);
  426. }
  427. public function publicAccountDataSummary(Request $request)
  428. {
  429. $validator = \Validator::make($request->all(),[
  430. 'start_date' => 'required|date',
  431. 'end_date' => 'required|date',
  432. 'app_id' => 'nullable',
  433. 'closing_date' => 'nullable|date',
  434. 'operator_id' => 'nullable|integer',
  435. 'pitcher_id' => 'nullable|integer',
  436. ]);
  437. if ($validator->fails()) {
  438. return self::returnValue($validator->getMessageBag(), 1102);
  439. }
  440. $params['start_date'] = $request->input('start_date');
  441. $params['end_date'] = $request->input('end_date');
  442. $params['closing_date'] = $request->input('closing_date');
  443. $params['cost_cover_min'] = $request->input('cost_cover_min');
  444. $params['cost_cover_max'] = $request->input('cost_cover_max');
  445. $params['admin_id'] = $request->input('admin_id');
  446. $params['is_system_admin'] = $request->input('is_system_admin');
  447. $params['sys_group_id'] = $request->input('sys_group_id');
  448. $params['operator_id'] = $request->input('operator_id');
  449. $params['pitcher_id'] = $request->input('pitcher_id');
  450. $params['app_id'] = $request->input('app_id');
  451. list($data, $header) = PublicAccountDataService::publicAccountDataSummary($params);
  452. return self::returnValue([
  453. 'data' => $data,
  454. 'header' => $header
  455. ]);
  456. }
  457. public function cumulativeRecoveryData(Request $request)
  458. {
  459. $validator = \Validator::make($request->all(),[
  460. 'start' => 'nullable',
  461. 'end' => 'nullable',
  462. 'page' => 'required|int',
  463. ]);
  464. if ($validator->fails()) {
  465. return self::returnValue($validator->getMessageBag(), 1102);
  466. }
  467. $startDate = $request->input('start_date');
  468. $endDate = $request->input('end_date');
  469. $page = (int)$request->input('page', 1);
  470. $pageSize = (int)$request->input('page_size', 20);
  471. $isSystemAdmin = $request->input('is_system_admin');
  472. $adminId = $request->input('admin_id');
  473. $sysGroupId = $request->input('sys_group_id');
  474. $res = NewStatisticsService::cumulativeRecoveryData($startDate, $endDate, $page, $pageSize, $isSystemAdmin
  475. , $adminId, $sysGroupId);
  476. return self::returnPageValue($res['list'], $res['total'], $pageSize, $page, $res['retrieveColumns']);
  477. }
  478. public function customerServiceData(Request $request)
  479. {
  480. $validator = \Validator::make($request->all(),[
  481. 'status' => 'nullable|in:1, 2, 3',
  482. 'active_status' => 'nullable|in:0, 1'
  483. ]);
  484. if ($validator->fails()) {
  485. return self::returnValue($validator->getMessageBag(), 1102);
  486. }
  487. $params['corp_id'] = $request->input('corp_id');
  488. $params['user_name'] = $request->input('user_name');
  489. $params['status'] = $request->input('status');
  490. $params['active_status'] = $request->input('active_status');
  491. $params['operator_uid'] = $request->input('operator_uid');
  492. $params['sort_field'] = $request->input('sort_field');
  493. $params['sort_type'] = $request->input('sort_type');
  494. $params['sort_field'] = empty($params['sort_field']) ? 'daily_new_contact_cnt' : $params['sort_field'];
  495. $params['sort_type'] = empty($params['sort_type']) ? 'desc' : $params['sort_type'];
  496. $page = (int)$request->input('page', 1);
  497. $pageSize = (int)$request->input('page_size', 20);
  498. $isSystemAdmin = $request->input('is_system_admin');
  499. $adminId = $request->input('admin_id');
  500. $sysGroupId = $request->input('sys_group_id');
  501. $res = NewStatisticsService::customerServiceData($params, $page, $pageSize, $isSystemAdmin, $adminId, $sysGroupId);
  502. return self::returnPageValue($res['list'], $res['total'], $pageSize, $page, $res['columns']);
  503. }
  504. public function customerServiceDataTotal(Request $request)
  505. {
  506. $validator = \Validator::make($request->all(),[
  507. 'status' => 'nullable|in:1, 2, 3',
  508. 'active_status' => 'nullable|in:0, 1'
  509. ]);
  510. if ($validator->fails()) {
  511. return self::returnValue($validator->getMessageBag(), 1102);
  512. }
  513. $params['corp_id'] = $request->input('corp_id');
  514. $params['user_name'] = $request->input('user_name');
  515. $params['status'] = $request->input('status');
  516. $params['active_status'] = $request->input('active_status');
  517. $params['operator_uid'] = $request->input('operator_uid');
  518. $isSystemAdmin = $request->input('is_system_admin');
  519. $adminId = $request->input('admin_id');
  520. $sysGroupId = $request->input('sys_group_id');
  521. $res = NewStatisticsService::customerServiceDataTotal($params, $isSystemAdmin, $adminId, $sysGroupId);
  522. return self::returnValue($res['data'], 0, $res['columns']);
  523. }
  524. }