feat:depot_recycle

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-02-10 16:11:26 +08:00
parent 22dd466254
commit 3f61e1e766
8 changed files with 361 additions and 4 deletions

View File

@@ -219,4 +219,16 @@ class DepotController
{
return (new DepotService)->recycleList();
}
/**
* 回收审核
* @param DepotRequest $request
* @return array
*/
#[RequestMapping(path: "recycle_audit", methods: "POST")]
#[Scene(scene: "recycle_audit")]
public function recycleAudit(DepotRequest $request): array
{
return (new DepotService)->recycleAudit();
}
}

View File

@@ -0,0 +1,73 @@
<?php
declare(strict_types=1);
namespace App\Controller\Api;
use App\Middleware\Api\JwtAuthMiddleware;
use App\Request\Admin\DepotRequest;
use App\Service\Api\Depot\DepotService;
use Exception;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middlewares;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
#[Controller(prefix: 'api/depot')]
#[Middlewares([
JwtAuthMiddleware::class,
])]
class DepotController
{
/**
* 回收
* @param DepotRequest $request
* @return array
* @throws Exception
*/
#[RequestMapping(path: "depot_recycle", methods: "POST")]
#[Scene(scene: "recycle")]
public function depotRecycle(DepotRequest $request): array
{
return (new DepotService)->recycle();
}
/**
* 回收修改数量
* @param DepotRequest $request
* @return array
* @throws Exception
*/
#[RequestMapping(path: "recycle_update", methods: "POST")]
#[Scene(scene: "recycle_update")]
public function recycleUpdate(DepotRequest $request): array
{
return (new DepotService)->recycleUpdate();
}
/**
* 回收删除
* @param DepotRequest $request
* @return array
* @throws Exception
*/
#[RequestMapping(path: "recycle_delete", methods: "POST")]
#[Scene(scene: "recycle_delete")]
public function recycleDelete(DepotRequest $request): array
{
return (new DepotService)->recycleDelete();
}
/**
* 回收列表
* @param DepotRequest $request
* @return array
*/
#[RequestMapping(path: "recycle_list", methods: "GET")]
#[Scene(scene: "recycle_list")]
public function recycleList(DepotRequest $request): array
{
return (new DepotService)->recycleList();
}
}