Aucune description

Oplog.php 701B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2019/9/18
  6. * Time: 15:07
  7. */
  8. namespace App;
  9. use Illuminate\Database\Eloquent\Model;
  10. class Oplog extends Model
  11. {
  12. public $timestamps = false;
  13. protected $table = "oplog";
  14. /**
  15. * 记录操作
  16. * @param type 1订单状态变更 0其他
  17. */
  18. public static function addLog($admin_id, $admin_name, $context = '', $type=0, $tables = null, $data_id = null){
  19. $params = array();
  20. $params['type'] = $type;
  21. $params['admin_id'] = $admin_id;
  22. $params['admin_name'] = $admin_name;
  23. $params['context'] = $context;
  24. $params['tables'] = $tables;
  25. $params['data_id'] = $data_id;
  26. return Oplog::insert($params);
  27. }
  28. }