noticereadmodel.php 649 B

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