|
@@ -1176,11 +1176,16 @@ class StoreOrder extends BaseModel
|
|
|
}else{
|
|
|
$where[] = ['purchase', '<>', 1];
|
|
|
}
|
|
|
- if ($page) $list = self::statusByWhere($status, $uid)->where('is_del', 0)->where('uid', $uid)
|
|
|
+ if ($purchase == 2){
|
|
|
+ $str = 'consignor';
|
|
|
+ }else{
|
|
|
+ $str = 'uid';
|
|
|
+ }
|
|
|
+ if ($page) $list = self::statusByWhere($status, $uid)->where('is_del', 0)->where($str, $uid)
|
|
|
->where($where)
|
|
|
->field('add_time,seckill_id,bargain_id,combination_id,id,order_id,pay_price,total_num,total_price,pay_postage,total_postage,paid,status,refund_status,pay_type,coupon_price,deduction_price,pink_id,delivery_type,is_del,shipping_type')
|
|
|
->order('add_time DESC')->page((int)$page, (int)$limit)->select()->toArray();
|
|
|
- else $list = self::statusByWhere($status, $uid)->where('is_del', 0)->where('uid', $uid)
|
|
|
+ else $list = self::statusByWhere($status, $uid)->where('is_del', 0)->where($str, $uid)
|
|
|
->where($where)
|
|
|
->field('add_time,seckill_id,bargain_id,combination_id,id,order_id,pay_price,total_num,total_price,pay_postage,total_postage,paid,status,refund_status,pay_type,coupon_price,deduction_price,pink_id,delivery_type,is_del,shipping_type')
|
|
|
->order('add_time DESC')->page((int)$page, (int)$limit)->select()->toArray();
|