feat: driver

This commit is contained in:
2025-04-01 11:49:50 +08:00
parent a7b99e2cf4
commit b68ad879c8
11 changed files with 554 additions and 124 deletions

View File

@@ -6,7 +6,10 @@ namespace App\Controller\Api;
use App\Controller\AbstractController;
use App\Middleware\Api\JwtAuthMiddleware;
use App\Service\Api\Driver\AbnormalReportingService;
use App\Service\Api\Driver\DeliverService;
use App\Service\Api\Driver\GetSiteListService;
use App\Service\Api\Driver\LoadActionService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middlewares;
use Hyperf\HttpServer\Annotation\RequestMapping;
@@ -18,10 +21,47 @@ use Hyperf\Validation\Annotation\Scene;
])]
class DriverController extends AbstractController
{
/**
* 获取信息
* @return array
*/
#[RequestMapping(path: 'get_site_list',methods: 'GET')]
#[Scene(scene: 'get_site_list')]
public function get_site_list()
{
return (new GetSiteListService)->handle();
}
/**
* 装车出餐
* @return array
*/
#[RequestMapping(path: 'load_action',methods: 'GET')]
#[Scene(scene: 'load_action')]
public function load_action()
{
return (new LoadActionService)->handle();
}
/**
* 异常上报
* @return array
*/
#[RequestMapping(path: 'abnormal_reporting',methods: 'POST')]
#[Scene(scene: 'abnormal_reporting')]
public function abnormal_reporting()
{
return (new AbnormalReportingService)->handle();
}
/**
* 送达
* @return array
*/
#[RequestMapping(path: 'deliver',methods: 'GET')]
#[Scene(scene: 'deliver')]
public function deliver()
{
return (new DeliverService)->handle();
}
}