|
|
@@ -505,6 +505,39 @@ class UserThirdRepository extends BaseRepository
|
|
505
|
505
|
return compact('count', 'list');
|
|
506
|
506
|
}
|
|
507
|
507
|
|
|
|
508
|
+
|
|
|
509
|
+
|
|
|
510
|
+ /*话费订单*/
|
|
|
511
|
+ public function GetHfOrder($where = [], $page = 1, $limit = 10)
|
|
|
512
|
+ {
|
|
|
513
|
+ $query = Db::name("order_huafei");
|
|
|
514
|
+ $query = $query->when(isset($where['date']) && $where['date'] != '', function ($query) use ($where) {
|
|
|
515
|
+ getModelTime($query, $where['date']);
|
|
|
516
|
+ })->when(isset($where['status']) && $where['status'] != '', function ($query) use ($where) {
|
|
|
517
|
+ $query->where('status', $where['status']);
|
|
|
518
|
+ })->when(isset($where['order_sn']) && $where['order_sn'] != '', function ($query) use ($where) {
|
|
|
519
|
+ $query->where('order_sn', $where['order_sn']);
|
|
|
520
|
+ })->when($where['bill_status'] != '', function ($query) use ($where) {
|
|
|
521
|
+ $query->where('bill_status', $where['bill_status']);
|
|
|
522
|
+ })->when(isset($where['keywords']) && $where['keywords'] != '', function ($query) use ($where) {
|
|
|
523
|
+ $query->whereLike("mobile|uid", "%" . $where['keywords'] . "%");
|
|
|
524
|
+ });
|
|
|
525
|
+ $count = $query->count();
|
|
|
526
|
+ $list = $query->page($page, $limit)->order('create_time DESC')->select()->each(function ($value) {
|
|
|
527
|
+ $value['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
|
|
|
528
|
+ //淘客订单状态
|
|
|
529
|
+ // $tkStatus = $value['status'];
|
|
|
530
|
+ // $tkStatusName = TbOrderModel::$statusName[$tkStatus] ?? '未知状态';
|
|
|
531
|
+ // $value['status_name'] = $tkStatusName;
|
|
|
532
|
+ //订单关联用户信息
|
|
|
533
|
+ $value['account'] = User::where('uid', $value['uid'])->value('account', '匹配用户不存在');
|
|
|
534
|
+ return $value;
|
|
|
535
|
+ });
|
|
|
536
|
+ return compact('count', 'list');
|
|
|
537
|
+ }
|
|
|
538
|
+
|
|
|
539
|
+
|
|
|
540
|
+
|
|
508
|
541
|
/*详情*/
|
|
509
|
542
|
public function GetThirdDetail($id, $table)
|
|
510
|
543
|
{
|
|
|
@@ -549,6 +582,12 @@ class UserThirdRepository extends BaseRepository
|
|
549
|
582
|
$billEndTime = $data['bill_end_time'];
|
|
550
|
583
|
$data['bill_end_time'] = $billEndTime ? date('Y-m-d H:i:s', $billEndTime) : '';
|
|
551
|
584
|
break;
|
|
|
585
|
+ case 'huafei':
|
|
|
586
|
+ $createTime = $data['create_time'];
|
|
|
587
|
+ $data['create_time'] = $createTime ? $createTime : '';
|
|
|
588
|
+ $billEndTime = $data['bill_end_time'];
|
|
|
589
|
+ $data['bill_end_time'] = $billEndTime ? date('Y-m-d H:i:s', $billEndTime) : '';
|
|
|
590
|
+ break;
|
|
552
|
591
|
}
|
|
553
|
592
|
return $data;
|
|
554
|
593
|
}
|