userlocationhismodel.php 820 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: sicilon_IT
  5. * Date: 2021/5/10
  6. * Time: 10:06
  7. */
  8. namespace app\index\model;
  9. use think\Model;
  10. class userlocationhismodel extends Model{
  11. protected $table='t_userlocation_history';
  12. public function sellistbyopenid($openid){
  13. $where_arr['openid']=$openid;
  14. $uloction=$this->where($where_arr)->order('id','desc')->select();
  15. return $uloction;
  16. }
  17. /*
  18. * 20210510
  19. *
  20. */
  21. public function insinfo($arr){
  22. $this->setAttr('id',null)->isUpdate(false)->allowField(true)->save($arr);
  23. return $this->id;
  24. }
  25. /*
  26. * 20210510
  27. */
  28. public function sellistbywid($wid){
  29. $where_arr['wid']=$wid;
  30. $uloction=$this->where($where_arr)->order('id','desc')->select();
  31. return $uloction;
  32. }
  33. }