usersearchrecordmodel.php 518 B

123456789101112131415161718192021222324
  1. <?php
  2. /*
  3. * @Author: wang jun
  4. * @Date: 2021-09-28 11:13:58
  5. * @Last Modified by: wang jun
  6. * @Last Modified time: 2021-09-28 13:55:21
  7. */
  8. namespace app\index\model;
  9. use think\Model;
  10. class usersearchrecordmodel extends Model
  11. {
  12. protected $table = 't_usersearchrecord';
  13. public function insinfo($arr)
  14. {
  15. if (!isset($arr['searchtime']) || empty($arr['searchtime'])) {
  16. $arr['searchtime'] = date("Y-m-d H:i:s");
  17. }
  18. $id = $this->insertGetId($arr);
  19. return $id;
  20. }
  21. }