临时大屏数据查询接口

This commit is contained in:
liu 2024-06-17 15:50:05 +08:00
parent 725dc922bf
commit 3ccaee4897
2 changed files with 19 additions and 0 deletions

View File

@ -3,12 +3,14 @@
namespace app\store\controller;
use app\common\controller\Definitions;
use app\common\model\dict\DictType;
use app\store\lists\store_order\StoreOrderLists;
use app\store\logic\WorkbenchLogic;
// #[ApiDoc\Title('工作台')]
class WorkbenchController extends BaseAdminController
{
public $notNeedLogin = ['recharge_statistics'];
// #[
// ApiDoc\Title('交易统计'),
@ -159,4 +161,13 @@ class WorkbenchController extends BaseAdminController
$result = WorkbenchLogic::revenueStatistics($params);
return $this->data($result);
}
public function recharge_statistics()
{
$params['store_id'] = DictType::where('type','store')->value('remark')??5;
$result = WorkbenchLogic::rechargeData($params);
return $this->data($result);
}
}

View File

@ -709,6 +709,14 @@ class WorkbenchLogic extends BaseLogic
}
public static function rechargeData($params)
{
$data['receipt_amount'] = UserRecharge::where([
'store_id'=>$params['store_id'],
'paid'=>YesNoEnum::YES
])->sum('price');
return $data??[];
}