修改教研组

This commit is contained in:
巴掌 committed 2021-11-08 21:43:58 +08:00
1 parent f56403152e
commit 532151cf62
2 files changed
+4 -2

No files matched your search

+1
View File
@@ -94,6 +94,7 @@ class JiaoyanZuzhang extends Model
public function srcTeacherNow($admin_id)
{
$teacher = $this->where('teacher_id', $admin_id)
->whereTime('bfdate', '<=', time())
->order(['bfdate'=>'desc'])
->field('jiaoyanzu_id
,any_value(teacher_id) as teacher_id
+3 -2
View File
@@ -156,14 +156,15 @@ class Jiaoyanzu extends BaseModel
{
$zh = new \app\teach\model\JiaoyanZuzhang;
$zhInfo = $zh->where('jiaoyanzu_id', $this->id)
->where('bfdate', '<=', time())
->order(['bfdate' => 'desc'])
->with([
'glTeacher' => function ($query) {
$query->field('id, xingming');
}
])
->find();
->find();
$str = ['id', 'xingming'];
if ($zhInfo) {
$str = [