| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace app\admin\model\dao;
- use app\common\model\UserModel;
- use think\facade\Db;
- class SystemNode extends BaseDao
- {
- public static $table = "db_system_node";
- public function __construct()
- {
- }
- public static function getNodeByNodeList($nodeList)
- {
- return Db::table(self::$table)->whereIn('node', array_column($nodeList, 'node'))->select();
- }
- public static function update($id, $title, $is_auth)
- {
- Db::table(self::$table)->where('id', $id)->update([
- 'update_time' => time(),
- 'title' => $title,
- 'is_auth' => $is_auth,
- ]);
- }
- public static function getNodeAndTitleAndIsAuth()
- {
- return Db::table(self::$table)->field('node,title,type,is_auth')->select();
- }
- }
|