liumiao
2021-01-26 19c2aad425b96c7bed32248e87286684241258d2
根据学员获取课次
1 files modified
26 ■■■■ changed files
app/Http/Controllers/Api/v1/ClassScheduleController.php 26 ●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/ClassScheduleController.php
@@ -343,7 +343,7 @@
        $date = $request->post("date");
        $orgId = $request->post("orgId", 43);
        $roleIdArr = $request->post("roleIdArr");
        $teacherId = $this->getAndCheckTeacherId();
        $teacherId = 44283;//$this->getAndCheckTeacherId();
        if(empty($date))
        {
            $date = date("Y-m-d");
@@ -547,21 +547,19 @@
    {
        $roleIdList = explode(",", $roleIdArr);
        $roleType = 0;
        foreach($roleIdList as $val)
        if(in_array(2026, $roleIdList))
        {
            switch ($val)
            {
                case 2026:
                    $roleType = 1;
                    break;
                case 3085:
                    $roleType = 3;
                    break;
                default:
                    $roleType = 2;
                    break;
            }
            $roleType = 1;
        }
        else if(in_array(2020, $roleIdList))
        {
            $roleType = 2;
        }
        else if(in_array(3085, $roleIdList))
        {
            $roleType = 3;
        }
        return $roleType;
    }
}