LogModel.php 758 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * LogModel.php UTF-8
  4. *
  5. *
  6. * @date : 2021/9/30 14:19
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : cuizhixiong <czx1@huosdk.com>
  10. * @version : HUOSDK 9.0
  11. */
  12. namespace huoIdentify\model;
  13. class LogModel extends \huo\model\log\LogModel {
  14. /**
  15. * 检查表是否处在
  16. *
  17. * @param int $create_time
  18. *
  19. * @return void
  20. */
  21. function checkTable($create_time = 0) {
  22. $_time = !empty($create_time) ? $create_time : time();
  23. $this->partition_data[$this->partition_field] = date('Y-m-d', $_time);
  24. $this->table = $this->getPartitionTableName(
  25. $this->partition_data, $this->partition_field, $this->partition_rule
  26. );
  27. }
  28. }