You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WorkGroupChatStatisticDao.php 845B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\dao\work;
  3. use app\dao\BaseDao;
  4. use app\model\work\WorkGroupChatStatistic;
  5. use crmeb\traits\SearchDaoTrait;
  6. /**
  7. * Class WorkGroupChatStatisticDao
  8. * @package app\dao\work
  9. */
  10. class WorkGroupChatStatisticDao extends BaseDao
  11. {
  12. use SearchDaoTrait;
  13. /**
  14. * @return string
  15. */
  16. protected function setModel(): string
  17. {
  18. return WorkGroupChatStatistic::class;
  19. }
  20. /**
  21. * 获取当前统计详情
  22. * @param int $chatId
  23. * @return array|\think\Model|null
  24. * @throws \think\db\exception\DataNotFoundException
  25. * @throws \think\db\exception\DbException
  26. * @throws \think\db\exception\ModelNotFoundException
  27. */
  28. public function getToDayInfo(int $chatId)
  29. {
  30. return $this->getModel()->whereDay('create_time')->where('group_id', $chatId)->find();
  31. }
  32. }