Commit a1652186 by hcy001
parents 02192b55 6744a1d6
......@@ -197,4 +197,10 @@ class ApiController extends Controller
Export((new QuoteModel())->edit($input));
}
// 操作日志
public function ApiOperationLog($input, $id)
{
ExportLayui((new OpLogModel())->getList($input));
}
}
......@@ -25,15 +25,22 @@ class OpLogModel extends Model
continue;
}
switch ($k){
case "relation_id":
case "relation_sn":
case "types":
$query->where($k,$v);
break;
case "start_time":
$query->where('create_time', '>=', strtotime($v));
break;
case "end_time":
$query->where('create_time', '<=', strtotime($v)+86399);
break;
}
}
})->orderBy('id','desc')->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
})->orderBy('id','desc')->paginate($input['limit'], ['*'], 'page', $input['page'])->toArray();
if (!$list) return [20001, '没有数据'];
foreach ($list['data'] as $k=>&$v){
$v['types_val'] = $v['types'] == 1 ? '询价' : '报价';
$v['create_time'] = date("Y-m-d H:i:s",$v['create_time']);
}
return [0, '成功', $list['data'], $list['total']];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment