Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
8b5b84bb
Commit
8b5b84bb
authored
Nov 22, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作记录
parent
995ac1c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
1 deletion
+76
-1
Broker.php
application/index/controller/Broker.php
+35
-0
GOperatingRecords.php
application/model/GOperatingRecords.php
+38
-0
route.php
application/route.php
+3
-1
No files found.
application/index/controller/Broker.php
View file @
8b5b84bb
...
...
@@ -18,6 +18,7 @@ use app\model\ABindingDevice;
use
app\model\AStore
;
use
app\model\Evaluate
;
use
app\model\GHousesToAgents
;
use
app\model\GOperatingRecords
;
use
think\Session
;
class
Broker
extends
Basic
...
...
@@ -815,4 +816,37 @@ class Broker extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
/**
* 查询操作记录数据
* User: 朱伟
* Date: 2018-11-22
* Time: 14:55:27
*/
public
function
getRecordsList
()
{
$params
=
$this
->
request
->
param
();
$params
=
array
(
"agents_id"
=>
6495
);
if
(
!
isset
(
$params
[
"agents_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$field
=
'OperatingRecords.id as OperatingRecords_id,'
;
$field
.=
'OperatingRecords.name,'
;
$field
.=
'OperatingRecords.remark,'
;
$field
.=
'OperatingRecords.create_time'
;
$get_params
[
'OperatingRecords.user_id'
]
=
$params
[
"agents_id"
];
$get_params
[
'OperatingRecords.type'
]
=
7
;
$operatingRecords
=
new
GOperatingRecords
();
$res
=
$operatingRecords
->
getRecordsList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res_total
=
$operatingRecords
->
getRecordsListTotal
(
$field
,
$get_params
);
return
$this
->
response
(
"200"
,
"成功"
,[
'data'
=>
$res
,
'total'
=>
$res_total
]);
}
}
\ No newline at end of file
application/model/GOperatingRecords.php
View file @
8b5b84bb
...
...
@@ -94,4 +94,41 @@ class GOperatingRecords extends BaseModel
->
select
();
return
$data
;
}
/**
* 查询数据
* 朱伟 2018-11-22 14:56:47
*/
public
function
getRecordsList
(
$pageNo
,
$pageSize
,
$field
,
$params
)
{
$order
=
"OperatingRecords.create_time desc"
;
$result
=
$this
->
field
(
$field
)
->
alias
(
'OperatingRecords'
)
//->join('a_agents Agent', 'OperatingRecords.user_id = Agent.id', 'right')
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order
)
->
select
();
//dump($this->getLastSql());
return
$result
;
}
/**
* 查询数据统计
* 朱伟 2018-11-22 14:56:47
*/
public
function
getRecordsListTotal
(
$field
,
$params
)
{
$result
=
$this
->
field
(
$field
)
->
alias
(
'OperatingRecords'
)
//->join('a_agents Agent', 'OperatingRecords.user_id = Agent.id', 'right')
->
where
(
$params
)
->
count
();
//dump($this->getLastSql());
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
8b5b84bb
...
...
@@ -365,7 +365,9 @@ Route::group('index', [
'exportReportStore'
=>
[
'index/RankingList/exportReportStore'
,
[
'method'
=>
'GET|POST'
]],
'selectPkSortByTime'
=>
[
'index/RankingList/selectPkSortByTime'
,
[
'method'
=>
'GET|POST'
]],
'getRandKingListByAgentId'
=>
[
'index/RankingList/getRandKingListByAgentId'
,
[
'method'
=>
'GET|POST'
]],
'getStoreRandKingListByAgentId'
=>
[
'index/RankingList/getStoreRandKingListByAgentId'
,
[
'method'
=>
'GET|POST'
]],
'getStoreRandKingListByAgentId'
=>
[
'index/RankingList/getStoreRandKingListByAgentId'
,
[
'method'
=>
'GET|POST'
]
],
'getRecordsList'
=>
[
'index/broker/getRecordsList'
,
[
'method'
=>
'GET|POST'
]
],
]);
...
...
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