SystemArticle.php 583 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\admin\model\dao;
  3. use app\common\model\UserModel;
  4. use think\facade\Db;
  5. class SystemArticle extends BaseDao
  6. {
  7. public static $table = "db_system_article";
  8. public function __construct()
  9. {
  10. }
  11. public static function count($type)
  12. {
  13. return $count = Db::table(self::$table)->where('type', $type)->count();
  14. }
  15. public static function getIdNameMapByStatus($int)
  16. {
  17. return Db::table(self::$table)
  18. ->where('status', $int)
  19. ->field('id,name')
  20. ->select()
  21. ->toArray();
  22. }
  23. }