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
33976746
Commit
33976746
authored
Dec 12, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
黑名单列表
parent
c84dc9ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
9 deletions
+65
-9
Broker.php
application/index/controller/Broker.php
+42
-0
AAgentsBlackList.php
application/model/AAgentsBlackList.php
+22
-9
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Broker.php
View file @
33976746
...
@@ -958,6 +958,47 @@ class Broker extends Basic
...
@@ -958,6 +958,47 @@ class Broker extends Basic
}
}
/**
* 黑名单列表
* User: 朱伟
* Date: 2018年12月12日
* Time: 15:35:40
*/
public
function
getAgentsBlackList
()
{
$params
=
$this
->
params
;
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$m_agents_black_list
=
new
AAgentsBlackList
();
if
(
isset
(
$params
[
"name"
]))
{
$get_params
[
'Agents.name'
]
=
$params
[
"name"
];
}
if
(
isset
(
$params
[
"phone"
]))
{
$get_params
[
'Agents.phone'
]
=
$params
[
"phone"
];
}
$get_params
[
'BlackList.status'
]
=
0
;
$field
=
'BlackList.agents_id,'
;
$field
.=
'Agents.status,'
;
$field
.=
'Agents.name,'
;
$field
.=
'Agents.phone,'
;
$field
.=
'Agents.img,'
;
$field
.=
'Agents.create_time,'
;
$field
.=
'Store.store_name'
;
$res
=
$m_agents_black_list
->
getAgentsBlackList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res_total
=
$m_agents_black_list
->
getDatasTotal
(
$get_params
);
foreach
(
$res
as
$k
=>
$v
)
{
$res
[
$k
][
'head_portrait'
]
=
AGENTHEADERIMGURL
.
$v
[
'img'
];
}
$data
[
'total'
]
=
$res_total
;
$data
[
'data_list'
]
=
$res
;
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
}
}
}
\ No newline at end of file
application/model/AAgentsBlackList.php
View file @
33976746
...
@@ -19,10 +19,7 @@ class AAgentsBlackList extends Model
...
@@ -19,10 +19,7 @@ class AAgentsBlackList extends Model
return
$this
->
insertGetId
(
$data
);
return
$this
->
insertGetId
(
$data
);
}
}
/**
* 查询数据
* 朱伟 2018-07-04
*/
public
function
getDatas
(
$field
,
$params
)
public
function
getDatas
(
$field
,
$params
)
{
{
$result
=
Db
::
table
(
$this
->
table
)
$result
=
Db
::
table
(
$this
->
table
)
...
@@ -34,15 +31,32 @@ class AAgentsBlackList extends Model
...
@@ -34,15 +31,32 @@ class AAgentsBlackList extends Model
return
$result
;
return
$result
;
}
}
public
function
getAgentsBlackList
(
$pageNo
,
$pageSize
,
$field
,
$params
)
{
$order
=
"BlackList.create_time desc"
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
'BlackList'
)
->
join
(
'a_agents Agents'
,
'BlackList.agents_id = Agents.id'
,
'left'
)
->
join
(
'a_store Store'
,
'Agents.store_id = Store.id'
,
'left'
)
->
where
(
$params
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order
)
->
select
();
// dump($this->getLastSql());
return
$result
;
}
/**
/**
* 查询数据统计
* 查询数据统计
* 朱伟 2018-08-10
*/
*/
public
function
getDatasTotal
(
$
field
,
$
params
)
public
function
getDatasTotal
(
$params
)
{
{
$result
=
Db
::
table
(
$this
->
table
)
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
'BlackList'
)
//->alias('a')
->
join
(
'a_agents Agents'
,
'BlackList.agents_id = Agents.id'
,
'left'
)
->
join
(
'a_store Store'
,
'Agents.store_id = Store.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
count
();
->
count
();
//dump($this->getLastSql());
//dump($this->getLastSql());
...
@@ -52,7 +66,6 @@ class AAgentsBlackList extends Model
...
@@ -52,7 +66,6 @@ class AAgentsBlackList extends Model
/**
/**
* 更新数据
* 更新数据
* 朱伟 2018-07-04
*/
*/
public
function
updateDatas
(
$params
)
public
function
updateDatas
(
$params
)
{
{
...
...
application/route.php
View file @
33976746
...
@@ -378,6 +378,7 @@ Route::group('index', [
...
@@ -378,6 +378,7 @@ Route::group('index', [
'downloadFile'
=>
[
'index/news/downloadFile'
,
[
'method'
=>
'GET|POST'
]
],
//新增商学院资讯
'downloadFile'
=>
[
'index/news/downloadFile'
,
[
'method'
=>
'GET|POST'
]
],
//新增商学院资讯
'addAgentsBlackList'
=>
[
'index/broker/addAgentsBlackList'
,
[
'method'
=>
'GET|POST'
]
],
//添加黑名单
'addAgentsBlackList'
=>
[
'index/broker/addAgentsBlackList'
,
[
'method'
=>
'GET|POST'
]
],
//添加黑名单
'getAgentsBlackList'
=>
[
'index/broker/getAgentsBlackList'
,
[
'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