临时大屏数据查询接口
This commit is contained in:
parent
725dc922bf
commit
3ccaee4897
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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??[];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user