Commit adfab9c1 authored by suntengda's avatar suntengda

update 供应商相关接口

parent 4bdef15d
......@@ -7,7 +7,7 @@
use App\Base\Base;
use App\Services\goods\OtaService;
use Validate\otaValidate;
use Validate\OtaValidate;
class OtaController extends Base
{
......@@ -17,7 +17,7 @@ class OtaController extends Base
*/
public function listAction()
{
(new otaValidate())->scene('list')->validate();
(new OtaValidate())->scene('list')->validate();
$name = $this->params['ota_name'] ?? '';
$printerSn = $this->params['printer_sn'] ?? '';
......@@ -35,7 +35,7 @@ class OtaController extends Base
*/
public function addAction()
{
(new otaValidate())->scene('add')->validate();
(new OtaValidate())->scene('add')->validate();
$res = OtaService::add($this->params);
$this->success(['status' => $res ? 'success' : 'failed']);
......@@ -47,7 +47,7 @@ class OtaController extends Base
*/
public function deleteAction()
{
(new otaValidate())->scene('delete')->validate();
(new OtaValidate())->scene('delete')->validate();
$res = OtaService::deleteOne($this->params['ota_id']);
$this->success(['status' => $res ? 'success' : 'failed']);
......@@ -60,7 +60,7 @@ class OtaController extends Base
*/
public function updateAction()
{
(new otaValidate())->scene('update')->validate();
(new OtaValidate())->scene('update')->validate();
$res = OtaService::update($this->params);
$this->success(['status' => $res ? 'success' : 'failed']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment