TokenModel.php 459 B

123456789101112131415161718
  1. <?php
  2. namespace app\index\model;
  3. use think\Model;
  4. class TokenModel extends Model
  5. {
  6. protected $table='token';
  7. public function getInfo($token,$company_code=''){
  8. $where['start_time'] = ['elt',time()];
  9. $where['end_time'] = ['egt',time()];
  10. $where['status'] = 1;
  11. $where['token'] = $token;
  12. $where['company_code'] = $company_code;
  13. $info = $this->where($where)->cache(30)->find();
  14. return $info;
  15. }
  16. }