|
@@ -122,17 +122,17 @@ class TradeService extends BaseService
|
|
|
if($type == 1){
|
|
if($type == 1){
|
|
|
|
|
|
|
|
if($status == 0){
|
|
if($status == 0){
|
|
|
- $query->where('a.user_id', '=', $userId);
|
|
|
|
|
|
|
+ $query->where(['a.user_id'=>$userId,'a.is_out'=>0]);
|
|
|
$query->whereNotIn('a.sell_uid', [$userId]);
|
|
$query->whereNotIn('a.sell_uid', [$userId]);
|
|
|
}else if($status == 2){
|
|
}else if($status == 2){
|
|
|
$query->where('a.sell_uid', '=',$userId);
|
|
$query->where('a.sell_uid', '=',$userId);
|
|
|
$query->whereNotIn('a.user_id', [$userId]);
|
|
$query->whereNotIn('a.user_id', [$userId]);
|
|
|
}else{
|
|
}else{
|
|
|
- $query->where('a.user_id', '=', $userId);
|
|
|
|
|
|
|
+ $query->where(['a.user_id'=>$userId,'a.is_out'=>0]);
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
if($userId){
|
|
if($userId){
|
|
|
- $query->where('a.user_id', '=', $userId);
|
|
|
|
|
|
|
+ $query->where(['a.user_id'=>$userId,'a.is_out'=>0]);
|
|
|
}else if($sellUid){
|
|
}else if($sellUid){
|
|
|
$query->where('a.sell_uid', '=', $sellUid);
|
|
$query->where('a.sell_uid', '=', $sellUid);
|
|
|
}
|
|
}
|