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
21801b28
Commit
21801b28
authored
Dec 12, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加黑名单
parent
78b6d61e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
3 deletions
+72
-3
Broker.php
application/index/controller/Broker.php
+66
-0
AAgentsBlackList.php
application/model/AAgentsBlackList.php
+1
-1
route.php
application/route.php
+5
-2
No files found.
application/index/controller/Broker.php
View file @
21801b28
...
...
@@ -14,6 +14,8 @@ use app\api_broker\service\CallPhoneService;
use
app\api_broker\service\PushMessageService
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgentsBlackList
;
use
app\model\AAgentsBlackListImg
;
use
app\model\ABindingDevice
;
use
app\model\AOperatingRecords
;
use
app\model\AStore
;
...
...
@@ -895,4 +897,67 @@ class Broker extends Basic
return
$this
->
response
(
$code
,
$msg
,[
'data'
=>
$list
,
'total'
=>
$total
]);
}
/**
* 添加黑名单
* User: 朱伟
* Date: 2018年12月12日
* Time: 11:28:01
*/
public
function
addAgentsBlackList
(){
$params
=
$this
->
params
;
/* $params = array(
"agents_id" => 6524,
"content" => 'ceshi',
);*/
if
(
!
isset
(
$params
[
"agents_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$save_data
[
'status'
]
=
4
;
$save_data
[
'id'
]
=
$params
[
'agents_id'
];
$broker_service
=
new
BrokerService
();
$data
=
$broker_service
->
updateStatus
(
$save_data
,
$this
->
userId
);
if
(
$data
[
'status'
]
==
'fail'
)
{
return
$this
->
response
(
"101"
,
$data
[
'msg'
]);
}
$m_agents_black_list
=
new
AAgentsBlackList
();
$m_agents_black_list_img
=
new
AAgentsBlackListImg
();
//先判断是否已经存在数据
$field
=
'id,status'
;
$get_params
[
'status'
]
=
0
;
$get_params
[
'agents_id'
]
=
$params
[
"agents_id"
];
$get_data_res
=
$m_agents_black_list
->
getDatas
(
$field
,
$get_params
);
if
(
$get_data_res
){
//如果存在
$res
=
true
;
}
else
{
//不存在则新增数据
$insert
[
"agents_id"
]
=
$params
[
'agents_id'
];
$insert
[
"content"
]
=
$params
[
'content'
];
$insert
[
"status"
]
=
0
;
$res
=
$m_agents_black_list
->
saveData
(
$insert
);
if
(
$res
&&
$params
[
"img_info"
]){
foreach
(
$params
[
"img_info"
]
as
$k
=>
$v
){
$insert
=
[];
$insert
[
"file_name"
]
=
$v
[
'file_name'
];
$insert
[
"father_id"
]
=
$res
;
$insert
[
"type"
]
=
0
;
$insert
[
"status"
]
=
0
;
$res
=
$m_agents_black_list_img
->
saveData
(
$insert
);
}
}
}
if
(
$res
)
{
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
return
$this
->
response
(
"101"
,
"失败"
);
}
}
}
\ No newline at end of file
application/model/AAgentsBlackList.php
View file @
21801b28
...
...
@@ -16,7 +16,7 @@ class AAgentsBlackList extends Model
$data
[
'create_time'
]
=
$time
;
$data
[
'update_time'
]
=
$time
;
return
$this
->
insert
(
$data
);
return
$this
->
insert
GetId
(
$data
);
}
/**
...
...
application/route.php
View file @
21801b28
...
...
@@ -373,9 +373,12 @@ Route::group('index', [
'getRandKingListByAgentId'
=>
[
'index/RankingList/getRandKingListByAgentId'
,
[
'method'
=>
'GET|POST'
]],
'getStoreRandKingListByAgentId'
=>
[
'index/RankingList/getStoreRandKingListByAgentId'
,
[
'method'
=>
'GET|POST'
]],
'getRecordsList'
=>
[
'index/broker/getRecordsList'
,
[
'method'
=>
'post|get'
]],
//解绑或绑定经纪人设备id
'getRecordsList'
=>
[
'index/broker/getRecordsList'
,
[
'method'
=>
'post|get'
]
],
//解绑或绑定经纪人设备id
'downloadFile'
=>
[
'index/news/downloadFile'
,
[
'method'
=>
'GET|POST'
]
],
//新增商学院资讯
'addAgentsBlackList'
=>
[
'index/broker/addAgentsBlackList'
,
[
'method'
=>
'GET|POST'
]
],
//添加黑名单
'downloadFile'
=>
[
'index/news/downloadFile'
,
[
'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