Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a1652186
authored
Mar 08, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
ssh://119.23.72.7:22611/q578953158/php_frq_api
parents
02192b55
6744a1d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
app/Http/Controllers/ApiController.php
app/Model/OpLogModel.php
app/Http/Controllers/ApiController.php
View file @
a1652186
...
...
@@ -197,4 +197,10 @@ class ApiController extends Controller
Export
((
new
QuoteModel
())
->
edit
(
$input
));
}
// 操作日志
public
function
ApiOperationLog
(
$input
,
$id
)
{
ExportLayui
((
new
OpLogModel
())
->
getList
(
$input
));
}
}
app/Model/OpLogModel.php
View file @
a1652186
...
...
@@ -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'
],
[
'*'
],
'p
age'
,
$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'
]];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment