SystemNode.php 798 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\admin\model\dao;
  3. use app\common\model\UserModel;
  4. use think\facade\Db;
  5. class SystemNode extends BaseDao
  6. {
  7. public static $table = "db_system_node";
  8. public function __construct()
  9. {
  10. }
  11. public static function getNodeByNodeList($nodeList)
  12. {
  13. return Db::table(self::$table)->whereIn('node', array_column($nodeList, 'node'))->select();
  14. }
  15. public static function update($id, $title, $is_auth)
  16. {
  17. Db::table(self::$table)->where('id', $id)->update([
  18. 'update_time' => time(),
  19. 'title' => $title,
  20. 'is_auth' => $is_auth,
  21. ]);
  22. }
  23. public static function getNodeAndTitleAndIsAuth()
  24. {
  25. return Db::table(self::$table)->field('node,title,type,is_auth')->select();
  26. }
  27. }