29 lines
833 B
PHP
29 lines
833 B
PHP
<?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'));
|
|
}
|
|
|
|
}
|