小程序明细相关
This commit is contained in:
parent
c19ba84f06
commit
6619f6ae21
@ -205,15 +205,22 @@ class UserLogic extends BaseLogic
|
||||
switch ($params['type']){
|
||||
case 1:
|
||||
//采购款明细
|
||||
$categories = ['user_balance_recharge', 'user_order_purchase_pay'];
|
||||
$categories = ['user_balance_recharge', 'user_order_purchase_pay','system_purchase_add'];
|
||||
$query = CapitalFlow::where('uid', $uid)
|
||||
->whereIn('category', $categories);
|
||||
if($params['mark'] == 1){
|
||||
$query->where('type','in');
|
||||
}
|
||||
if($params['mark'] == 2){
|
||||
$query->where('type','out');
|
||||
}
|
||||
$count = $query->count();
|
||||
$data = $query
|
||||
->page($params['page_no'],$params['page_size'])
|
||||
->order('id','desc')
|
||||
->select()->toArray();
|
||||
foreach ($data as &$value){
|
||||
if($value['category'] == 'user_order_purchase_pay'){
|
||||
if($value['category'] == 'user_order_purchase_pay' || $value['category'] == 'system_purchase_add' ){
|
||||
$value['order_sn'] = StoreOrder::where('id',$value['link_id'])->value('order_id');
|
||||
}elseif($value['category'] == 'user_balance_recharge'){
|
||||
$value['order_sn'] = UserRecharge::where('id',$value['link_id'])->value('order_id');
|
||||
@ -222,11 +229,19 @@ class UserLogic extends BaseLogic
|
||||
break;
|
||||
case 2:
|
||||
//余额明细
|
||||
$category = ['system_balance_add','user_order_balance_pay'];
|
||||
$query = CapitalFlow::where('uid', $uid)
|
||||
->where('category', 'user_order_balance_pay');
|
||||
->whereIn('category', $category);
|
||||
if($params['mark'] == 1){
|
||||
$query->where('type','in');
|
||||
}
|
||||
if($params['mark'] == 2){
|
||||
$query->where('type','out');
|
||||
}
|
||||
$count = $query->count();
|
||||
$data = $query
|
||||
->page($params['page_no'],$params['page_size'])
|
||||
->order('id','desc')
|
||||
->select()->toArray();
|
||||
foreach ($data as &$value){
|
||||
$value['order_sn'] = StoreOrder::where('id',$value['link_id'])->value('order_id');
|
||||
@ -236,6 +251,12 @@ class UserLogic extends BaseLogic
|
||||
case 3:
|
||||
//礼品券明细
|
||||
$query = UserSign::where(['uid'=>$uid]);
|
||||
if($params['mark'] == 1){
|
||||
$query->where('financial_pm',1);
|
||||
}
|
||||
if($params['mark'] == 2){
|
||||
$query->where('financial_pm',0);
|
||||
}
|
||||
$count = $query->count();
|
||||
$data =$query
|
||||
->page($params['page_no'],$params['page_size'])
|
||||
@ -244,6 +265,12 @@ class UserLogic extends BaseLogic
|
||||
case 4:
|
||||
//返还金明细 -todo back
|
||||
$query = VipFlow::with('store')->where(['user_id'=>$uid]);
|
||||
if($params['mark'] == 1){
|
||||
$query->where('status',1);
|
||||
}
|
||||
if($params['mark'] == 2){
|
||||
$query->where('status',0);
|
||||
}
|
||||
$count = $query->count();
|
||||
$data = $query
|
||||
->page($params['page_no'],$params['page_size'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user