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
43c5d008
Commit
43c5d008
authored
Jan 04, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页消息
parent
95220c99
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
1 deletion
+57
-1
Broker.php
application/index/controller/Broker.php
+51
-0
Basic.php
application/index/extend/Basic.php
+4
-1
route.php
application/route.php
+2
-0
No files found.
application/index/controller/Broker.php
View file @
43c5d008
...
...
@@ -23,6 +23,7 @@ use app\model\AStore;
use
app\model\Evaluate
;
use
app\model\GHousesToAgents
;
use
app\model\GOperatingRecords
;
use
app\model\MPushMessage
;
use
think\Session
;
class
Broker
extends
Basic
...
...
@@ -1056,6 +1057,55 @@ class Broker extends Basic
return
$this
->
response
(
200
,
'删除成功'
);
}
/**
* 系统消息客户修改消息
* @return \think\Response
*/
public
function
getSystemMessageByUser
()
{
$params
=
$this
->
params
;
/* $params = array(
'page_no' => '1', //第几页
'page_size' => '15' //每页多少条
);*/
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$field
=
"id,addressee_id,type,message,user_id,create_time,is_read,order_id"
;
//获取此经纪人的所有盘方楼盘id
$param
[
"addressee_id"
]
=
$this
->
userId
;
$param
[
"type"
]
=
[
'in'
,
'6,9'
];
$param
[
"is_read"
]
=
0
;
$msgModel
=
new
MPushMessage
();
$history_result
=
$msgModel
->
getListByWhere
(
$field
,
$param
,
$page_no
,
$page_size
);
return
$this
->
response
(
"200"
,
"request success"
,
$history_result
);
}
/**
* 获取商铺消息和客户消息的未读消息个数,并修改已读消息状态
* @return \think\Response
*/
public
function
updateSystemMessageIsRead
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 1,//经纪人id
"read_ids" => "1,2,3" //需要修改的消息id
);*/
$msgModel
=
new
MPushMessage
();
//修改已读消息
if
(
!
empty
(
$params
[
'read_ids'
]))
{
$where_arr
[
"id"
]
=
array
(
"in"
,
$params
[
"read_ids"
]);
$update_arr
[
"is_read"
]
=
1
;
$msgModel
->
updateIsRead
(
$where_arr
,
$update_arr
);
}
return
$this
->
response
(
200
,
''
,
[]);
}
}
\ No newline at end of file
application/index/extend/Basic.php
View file @
43c5d008
...
...
@@ -67,7 +67,10 @@ class Basic extends Controller
'index/yindaoAndroid'
,
'index/yindaoIos'
,
'index/getUserMacAddress'
,
'index/getConfigWeek'
'index/getConfigWeek'
,
'index/getSystemMessageByUser'
,
'index/getSystemMessageByUser'
,
);
/**
...
...
application/route.php
View file @
43c5d008
...
...
@@ -392,6 +392,8 @@ Route::group('index', [
'getAgentsBlackList'
=>
[
'index/broker/getAgentsBlackList'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单列表
'getBlackListInfo'
=>
[
'index/broker/getBlackListInfo'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单详情
'delAgentsBlackListImg'
=>
[
'index/broker/delAgentsBlackListImg'
,
[
'method'
=>
'GET|POST'
]
],
//黑名单删除图片
'getSystemMessageByUser'
=>
[
'index/broker/getSystemMessageByUser'
,
[
'method'
=>
'GET'
]
],
//未读消息列表
'updateSystemMessageIsRead'
=>
[
'index/broker/updateSystemMessageIsRead'
,
[
'method'
=>
'POST'
]
],
//已读状态
'userDetail'
=>
[
'index/UserLog/userDetail'
,
[
'method'
=>
'get|post'
]],
'userLog'
=>
[
'index/UserLog/userLog'
,
[
'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