update
This commit is contained in:
parent
6fcf58424d
commit
3e4cf909b8
|
@ -39,13 +39,13 @@ class UserLogic extends BaseLogic
|
|||
public static function balanceList($params): array
|
||||
{
|
||||
$search = [];
|
||||
if(isset($params['record_id'])){
|
||||
if(isset($params['record_id']) && !empty($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'].'%'];
|
||||
}
|
||||
if(isset($params['appid'])){
|
||||
if(isset($params['appid']) && !empty($params['appid'])){
|
||||
$app = System::field('app_id')->where('id',$params['appid'])->findOrEmpty();
|
||||
if(!$app->isEmpty()){
|
||||
$search[] = ['appid','=',$app['app_id']];
|
||||
|
@ -54,6 +54,7 @@ class UserLogic extends BaseLogic
|
|||
if(isset($params['pay_type']) && in_array($params['pay_type'],[0,1,2,3,4])){
|
||||
$search[] = ['pay_type','=',$params['pay_type']];
|
||||
}
|
||||
dump($search);
|
||||
//获取用户余额列表
|
||||
$fields = 'id,record_id,amount,total_amount,type,pay_type,mark,appid,create_time';
|
||||
$lists = UserBalance::field($fields)->where('user_id',$params['uid'])->where($search)->page($params['page_no'],$params['page_size'])->order('create_time desc')->select()->each(function($item){
|
||||
|
@ -75,10 +76,10 @@ class UserLogic extends BaseLogic
|
|||
public static function integralList($params): array
|
||||
{
|
||||
$search = [];
|
||||
if(isset($params['mark'])){
|
||||
if(isset($params['mark']) && !empty($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();
|
||||
if(!$app->isEmpty()){
|
||||
$search[] = ['appid','=',$app['app_id']];
|
||||
|
|
Loading…
Reference in New Issue