<?php

namespace app\workerapi\controller;

use app\adminapi\logic\fault_code\FaultCodeLogic;
use app\adminapi\logic\fault_type\FaultTypeLogic;
use app\adminapi\validate\fault_code\FaultCodeValidate;

class FaultCodeController extends BaseApiController
{
    public array $notNeedLogin = ['getTreeLists','detail'];
    public function getTreeLists()
    {
        $goods_category_id = $this->request->get('goods_category_id', 0);
        $result = FaultTypeLogic::getAllData('api',$goods_category_id);
        return $this->data($result);
    }
    /**
     * @notes 获取列表
     * @return \think\response\Json
     * @author likeadmin
     * @date 2024/10/18 09:58
     */
    public function lists()
    {
        $params = (new FaultCodeValidate())->goCheck('detail');
        $result = FaultCodeLogic::lists($params);
        return $this->data($result);
    }
}


















































