zhangwei #9

Merged
weiz merged 2 commits from zhangwei into dev 2023-09-21 18:10:21 +08:00
1 changed files with 5 additions and 5 deletions

View File

@ -39,13 +39,13 @@ class UserLogic extends BaseLogic
public static function balanceList($params): array public static function balanceList($params): array
{ {
$search = []; $search = [];
if(isset($params['record_id'])){ if(isset($params['record_id']) && !empty($params['record_id'])){
$search[] = ['record_id','=',$params['record_id']]; $search[] = ['record_id','=',$params['record_id']];
} }
if(isset($params['mark'])){ if(isset($params['mark']) && !empty($params['mark'])){
$search[] = ['mark','like','%'.$params['mark'].'%']; $search[] = ['mark','like','%'.$params['mark'].'%'];
} }
if(isset($params['appid'])){ if(isset($params['appid']) && !empty($params['appid'])){
$app = System::field('app_id')->where('id',$params['appid'])->findOrEmpty(); $app = System::field('app_id')->where('id',$params['appid'])->findOrEmpty();
if(!$app->isEmpty()){ if(!$app->isEmpty()){
$search[] = ['appid','=',$app['app_id']]; $search[] = ['appid','=',$app['app_id']];
@ -75,10 +75,10 @@ class UserLogic extends BaseLogic
public static function integralList($params): array public static function integralList($params): array
{ {
$search = []; $search = [];
if(isset($params['mark'])){ if(isset($params['mark']) && !empty($params['mark'])){
$search[] = ['mark','like','%'.$params['mark'].'%']; $search[] = ['mark','like','%'.$params['mark'].'%'];
} }
if(isset($params['appid'])){ if(isset($params['appid']) && !empty($params['appid'])){
$app = System::field('app_id')->where('id',$params['appid'])->findOrEmpty(); $app = System::field('app_id')->where('id',$params['appid'])->findOrEmpty();
if(!$app->isEmpty()){ if(!$app->isEmpty()){
$search[] = ['appid','=',$app['app_id']]; $search[] = ['appid','=',$app['app_id']];