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
4fa1773a
Commit
4fa1773a
authored
Mar 25, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监督执行列表
parent
be279e2e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
Supervise.php
application/api_broker/controller/Supervise.php
+37
-0
SSupervision.php
application/model/SSupervision.php
+36
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Supervise.php
View file @
4fa1773a
...
...
@@ -71,4 +71,40 @@ class Supervise extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 监督执行列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSupervise
()
{
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$supervision
=
new
SSupervision
();
$fields
=
'content,img_url,b.name'
;
if
(
isset
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
}
if
(
isset
(
$this
->
params
[
'district_id'
]))
{
$where
[
'district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
isset
(
$this
->
params
[
'store_id'
]))
{
$where
[
'store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
empty
(
$where
))
{
return
$this
->
response
(
101
,
'Params is error'
);
}
$data
[
'list'
]
=
$supervision
->
getSupervisionList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
);
$data
[
'total'
]
=
$supervision
->
getSupervisionListTotal
(
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
}
}
\ No newline at end of file
application/model/SSupervision.php
View file @
4fa1773a
...
...
@@ -13,4 +13,39 @@ class SSupervision extends BaseModel
{
protected
$table
=
's_supervision'
;
/**
* 监督执行列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSupervisionList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id=b.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
/**
* 监督执行列表总记录数
*
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getSupervisionListTotal
(
$params
=
''
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id=b.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
}
\ No newline at end of file
application/route.php
View file @
4fa1773a
...
...
@@ -370,6 +370,7 @@ Route::group('broker', [
'uploadSuperviseFile'
=>
[
'api_broker/Supervise/uploadSuperviseFile'
,
[
'method'
=>
'post'
]],
//监督执行上传图片
'add_supervise'
=>
[
'api_broker/Supervise/add'
,
[
'method'
=>
'post'
]],
//监督执行
'addBargain'
=>
[
'api_broker/OrderLog/addBargain'
,
[
'method'
=>
'post'
]
],
//新增成交报告佣金(分佣提成)
'getSupervise'
=>
[
'api_broker/Supervise/getSupervise'
,
[
'method'
=>
'get'
]
],
//监督执行列表
]);
...
...
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