Account_token.php 647 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. *------Create thems Model------
  4. *------SCWPHP Version 1.0.0------
  5. *------Dev Model Jions------
  6. *------Create Time 2017-06-05 09:03:46------
  7. */
  8. namespace App\Commons\Model;
  9. use \System\Model;
  10. class Account_token extends Model {
  11. public $timestamps = false;
  12. protected $table = 'account_token';
  13. //´úÀíÔø¾­ÔÚÏß
  14. protected function getTime($timearea,$agent_id){
  15. $count=$this->whereBetween('last_time', $timearea)
  16. ->join('agent_child','agent_child.account_identity',$this->table.'.account_identity')
  17. ->where('agent_child.agent_identity',$agent_id)
  18. ->count();
  19. return $count;
  20. }
  21. }