12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- /**
- * AdminOperateLog.php UTF-8
- * 后台操作记录表
- *
- * @date : 2018/5/22 18:13
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : chenbingling <cbl@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace huo\model\user;
- use think\Model;
- class AdminOperateLog extends Model {
- protected $name = 'admin_operate_log';
- public function __construct($data = []) {
- parent::__construct($data);
- }
- /**
- * 操作记录
- *
- * @param array $map
- * @param int $offset
- *
- * @return bool|\think\Paginator
- * @throws \think\exception\DbException
- */
- public function userOperateLogInfo($map = [], $offset = 10) {
- $_data = $this
- ->where($map)
- ->order('id desc')
- ->paginate($offset);
- return $_data;
- }
- /**
- * 插入记录
- * @param $data
- *
- * @return bool|int|string
- */
- public function addLog($data) {
- $_res = $this->insert($data);
- if ($_res !== false) {
- return true;
- }
- return $_res;
- }}
|