添加店员管理

This commit is contained in:
luofei 2024-06-06 09:36:18 +08:00
parent 0de65a8ff5
commit d24dc210ac

View File

@ -0,0 +1,28 @@
<?php
namespace app\store\controller;
use app\common\logic\SystemStoreStaffLogic;
use hg\apidoc\annotation as ApiDoc;
#[ApiDoc\title('店员管理')]
class StaffController extends BaseAdminController
{
#[
ApiDoc\Title('列表'),
ApiDoc\url('/store/staff/lists'),
ApiDoc\Method('GET'),
ApiDoc\NotHeaders(),
ApiDoc\Author('中国队长'),
ApiDoc\ResponseSuccess("data", type: "array", children: [
['name' => 'id', 'desc' => 'id', 'type' => 'int'],
['name' => 'staff_name', 'desc' => '店员名称', 'type' => 'string'],
]),
]
public function lists(SystemStoreStaffLogic $staffLogic)
{
return $this->data($staffLogic->listByWhere(['store_id' => $this->request->adminInfo['store_id'], 'status' => 1], 'id,staff_name'));
}
}