初始版本

This commit is contained in:
贾祥聪
2025-08-19 14:16:51 +08:00
commit f937a1f9b9
4373 changed files with 359728 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
<?php
namespace app\shopapi\lists;
use app\coachapi\lists\BaseCoachApiDataLists;
use app\common\model\withdraw\WithdrawApply;
/**
* 提现记录
* Class LogLists
* @package app\coachapi\lists
*/
class WithdrawalLogLists extends BaseShopApiDataLists
{
public function setWhere(){
$where = [];
$where[] = ['source','=',2];
$where[] = ['apply_type','=',$this->params['type'] ?? 1];
$where[] = ['relation_id','=',$this->shopId];
$status = $this->params['status'] ?? '';
switch ($status){
case 1:
$where[] = ['status','=',1];
break;
case 2:
$where[] = ['status','=',4];
break;
case 3:
$where[] = ['status','in',[2,5]];
break;
case 4:
$where[] = ['status','in',[2,3,6]];
break;
}
return $where;
}
public function lists(): array
{
$lists = WithdrawApply::where($this->setWhere())
->field('id,status,money,create_time')
->append(['status_desc'])
->limit($this->limitOffset, $this->limitLength)
->order('id desc')
->select()
->toArray();
foreach ($lists as $key => $log){
$lists[$key]['desc'] = '提现';
}
return $lists;
}
public function count(): int
{
return WithdrawApply::where($this->setWhere())->count();
}
}