complainmodel.php 661 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: sicilon_IT
  5. * Date: 2021/4/21
  6. * Time: 19:17
  7. */
  8. namespace app\index\model;
  9. use think\Model;
  10. class complainmodel extends Model{
  11. protected $table='t_complainrecord';
  12. /*
  13. * 20210421
  14. *
  15. */
  16. public function insinfo($arr){
  17. $this->allowField(true)->isUpdate(false)->setAttr('id',null)->save($arr);
  18. return $this->id;
  19. }
  20. /*
  21. * 20210421
  22. * 读取
  23. */
  24. public function sellistbyunopr(){
  25. $where_arr['isopr']=0;
  26. $list=$this->where($where_arr)->order('id','desc')->select();
  27. $list=collection($list)->toArray();
  28. return $list;
  29. }
  30. }