重新整理数据数据模型、增加门面、整理常用方法

This commit is contained in:
巴掌 committed 2020-08-06 10:39:01 +08:00
1 parent 55cf0c34c5
commit d4cb9dc429
53 files changed
+903 -821

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
<?php
declare (strict_types = 1);
namespace app\tools\controller;
// 引用控制器基类
use app\BaseController;
class System extends BaseController
{
// 查询状态为1的学科
public function subjectAll()
{
$sbj = new \app\teach\model\Subject;
$sbjList = $sbj->where('status', 1)
->field('id, title, jiancheng, lieming')
->select();
return $sbj;
}
// 查询可以参加考试的学科
public function subjectKs()
{
$sbj = new \app\teach\model\Subject;
$sbjList = $sbj->where('status&kaoshi', 1)
->field('id, title, jiancheng, lieming')
->select();
return $sbj;
}
}