SystemAdminLogic.php 844 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\admin\logic;
  3. use app\admin\model\dao\MoneyLog;
  4. use app\admin\model\dao\ScoreLog;
  5. use app\admin\model\dao\ShopOrder;
  6. use app\admin\model\dao\User;
  7. use app\admin\model\SystemAdmin;
  8. use app\common\model\BoxModel;
  9. use app\common\model\UserMoneyModel;
  10. use think\facade\Cache;
  11. use think\facade\Db;
  12. class SystemAdminLogic
  13. {
  14. public static function getList($page, $limit, $where, $sort)
  15. {
  16. $count = (new SystemAdmin())
  17. ->where($where)
  18. ->count();
  19. $list = (new SystemAdmin())
  20. ->withoutField('password')
  21. ->where($where)
  22. ->withAttr('head_img',function ($value){
  23. return getPreviewUrl($value);
  24. })
  25. ->page($page, $limit)
  26. ->order($sort)
  27. ->select();
  28. return [$count, $list];
  29. }
  30. }