|
|
@@ -71,10 +71,7 @@ class AccountService extends BaseService
|
|
|
if(empty($item['type_text'])){
|
|
|
$item['type_text'] = isset($accountTypes[$type])? $accountTypes[$type] : '收支明细';
|
|
|
}
|
|
|
- $item['change_type'] = 1;
|
|
|
- if(in_array($type,[3,4])){
|
|
|
- $item['change_type'] = 2;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -88,11 +85,7 @@ class AccountService extends BaseService
|
|
|
public function getQuery($params)
|
|
|
{
|
|
|
$where = ['a.mark' => 1];
|
|
|
- $status = isset($params['status'])? $params['status'] : 0;
|
|
|
$type = isset($params['type'])? $params['type'] : 0;
|
|
|
- if($status>0){
|
|
|
- $where['a.status'] = $status;
|
|
|
- }
|
|
|
if($type>0){
|
|
|
$where['a.type'] = $type;
|
|
|
}
|
|
|
@@ -107,6 +100,13 @@ class AccountService extends BaseService
|
|
|
$query->where('a.user_id',$userId);
|
|
|
}
|
|
|
|
|
|
+ $status = isset($params['status'])? $params['status'] : 0;
|
|
|
+ if($status){
|
|
|
+ $query->where('a.status',$status);
|
|
|
+ }else{
|
|
|
+ $query->whereNotIn('a.status',[2]);
|
|
|
+ }
|
|
|
+
|
|
|
if ($keyword) {
|
|
|
$query->where(function($query) use($keyword){
|
|
|
$query->where('b.nickname','like',"%{$keyword}%")
|