ProductAssistUserDao.php 524 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\common\dao\store\product;
  3. use app\common\dao\BaseDao;
  4. use app\common\model\store\product\ProductAssistUser;
  5. class ProductAssistUserDao extends BaseDao
  6. {
  7. protected function getModel(): string
  8. {
  9. return ProductAssistUser::class;
  10. }
  11. public function userCount(int $limit = 3)
  12. {
  13. $count = $this->getModel()::getDB()->count("*");
  14. $list = $this->getModel()::getDB()->limit(3)->order('create_time DESC')->select();
  15. return compact('count','list');
  16. }
  17. }