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
49d699cf
Commit
49d699cf
authored
Sep 11, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统消息
parent
bc01c200
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
11 deletions
+98
-11
AppChat.php
application/chat/controller/AppChat.php
+66
-2
InviteTotal.php
application/index/controller/InviteTotal.php
+15
-0
MPushMessage.php
application/model/MPushMessage.php
+11
-0
route.php
application/route.php
+6
-9
No files found.
application/chat/controller/AppChat.php
View file @
49d699cf
...
@@ -22,6 +22,7 @@ use app\model\GHousesImgs;
...
@@ -22,6 +22,7 @@ use app\model\GHousesImgs;
use
app\model\HouseImgs
;
use
app\model\HouseImgs
;
use
app\model\HouseinfoExts
;
use
app\model\HouseinfoExts
;
use
app\model\HouseInfos
;
use
app\model\HouseInfos
;
use
app\model\MPushMessage
;
use
app\model\Users
;
use
app\model\Users
;
use
think\Cache
;
use
think\Cache
;
use
think\Exception
;
use
think\Exception
;
...
@@ -361,7 +362,6 @@ class AppChat extends Basic
...
@@ -361,7 +362,6 @@ class AppChat extends Basic
}
}
/**
/**
* 获取聊天关系
* 获取聊天关系
* @return \think\Response
* @return \think\Response
...
@@ -428,7 +428,7 @@ class AppChat extends Basic
...
@@ -428,7 +428,7 @@ class AppChat extends Basic
$result
=
$user
->
getAgentByUserId
(
$field
,
$params_
);
$result
=
$user
->
getAgentByUserId
(
$field
,
$params_
);
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
$result_
[
"id"
]
=
$result
[
0
][
"id"
];
$result_
[
"id"
]
=
$result
[
0
][
"id"
];
$result_
[
"agent_id"
]
=
'agent_'
.
$result
[
0
][
"id"
];
$result_
[
"agent_id"
]
=
'agent_'
.
$result
[
0
][
"id"
];
$result_
[
"user_name"
]
=
$result
[
0
][
"user_name"
];
$result_
[
"user_name"
]
=
$result
[
0
][
"user_name"
];
$result_
[
"user_nick"
]
=
$result
[
0
][
"user_nick"
];
$result_
[
"user_nick"
]
=
$result
[
0
][
"user_nick"
];
$result_
[
"user_pic"
]
=
!
empty
(
$result
[
0
][
"user_pic"
])
?
HEADERIMGURL
.
$result
[
0
][
"user_pic"
]
:
$result
[
0
][
"other_pic"
];
$result_
[
"user_pic"
]
=
!
empty
(
$result
[
0
][
"user_pic"
])
?
HEADERIMGURL
.
$result
[
0
][
"user_pic"
]
:
$result
[
0
][
"other_pic"
];
...
@@ -441,5 +441,69 @@ class AppChat extends Basic
...
@@ -441,5 +441,69 @@ class AppChat extends Basic
}
}
/**系统消息商铺修改消息
* @return \think\Response
*/
public
function
getSystemMessageByShop
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 5740,
'page_no' => '1', //第几页
'page_size' => '15' //每页多少条
);*/
if
(
!
isset
(
$params
[
'agent_id'
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$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,house_id,create_time"
;
//获取此经纪人的所有盘方楼盘id
$params
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$params
[
"type"
]
=
array
(
"in"
,
array
(
"1,3"
)
);
$msgModel
=
new
MPushMessage
();
$history_result
=
$msgModel
->
getListByWhere
(
$field
,
$params
,
$page_no
,
$page_size
);
return
$this
->
response
(
"200"
,
"request success"
,
array_reverse
(
$history_result
));
}
/**
* 系统消息客户修改消息
* @return \think\Response
*/
public
function
getSystemMessageByUser
()
{
$params
=
$this
->
params
;
/* $params = array(
"agent_id" => 5740,
'page_no' => '1', //第几页
'page_size' => '15' //每页多少条
);*/
if
(
!
isset
(
$params
[
'agent_id'
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$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"
;
//获取此经纪人的所有盘方楼盘id
$params
[
"addressee_id"
]
=
$params
[
"agent_id"
];
$params
[
"type"
]
=
2
;
$msgModel
=
new
MPushMessage
();
$history_result
=
$msgModel
->
getListByWhere
(
$field
,
$params
,
$page_no
,
$page_size
);
return
$this
->
response
(
"200"
,
"request success"
,
array_reverse
(
$history_result
));
}
}
}
application/index/controller/InviteTotal.php
0 → 100644
View file @
49d699cf
<?php
namespace
app\index\controller
;
use
app\index\extend\Basic
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/9/11
* Time : 16:37
* Intro:
*/
class
InviteTotal
extends
Basic
{
}
\ No newline at end of file
application/model/MPushMessage.php
View file @
49d699cf
...
@@ -211,4 +211,14 @@ class MPushMessage
...
@@ -211,4 +211,14 @@ class MPushMessage
}
}
return
$result
;
return
$result
;
}
}
public
function
getListByWhere
(
string
$field
,
array
$params
,
int
$page_no
=
1
,
int
$page_size
=
15
)
:
array
{
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
page
(
$page_no
)
->
limit
(
$page_size
)
->
select
();
}
}
}
\ No newline at end of file
application/route.php
View file @
49d699cf
...
@@ -296,8 +296,6 @@ Route::group('index', [
...
@@ -296,8 +296,6 @@ Route::group('index', [
'operationalData'
=>
[
'index/OperationalData/operationalDataList'
,
[
'method'
=>
'POST|GET'
]
],
//运营数据统计liu
'operationalData'
=>
[
'index/OperationalData/operationalDataList'
,
[
'method'
=>
'POST|GET'
]
],
//运营数据统计liu
'lookShopIndex'
=>
[
'index/LookShop/lookShopIndex'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志
'lookShopIndex'
=>
[
'index/LookShop/lookShopIndex'
,
[
'method'
=>
'GET'
]
],
//商铺查看日志
...
@@ -404,8 +402,6 @@ Route::group('api', [
...
@@ -404,8 +402,6 @@ Route::group('api', [
'saveSiteCity'
=>
[
'api/Location/saveSiteCity'
,
[
'method'
=>
'POST|GET'
]
],
//保存默认城市选择 c端
'saveSiteCity'
=>
[
'api/Location/saveSiteCity'
,
[
'method'
=>
'POST|GET'
]
],
//保存默认城市选择 c端
]);
]);
Route
::
group
(
'chat'
,
[
Route
::
group
(
'chat'
,
[
...
@@ -426,6 +422,12 @@ Route::group('chat', [
...
@@ -426,6 +422,12 @@ Route::group('chat', [
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/getHouseInfoByFrom'
,
[
'method'
=>
'post|get'
]
],
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/getHouseInfoByFrom'
,
[
'method'
=>
'post|get'
]
],
'getUserInfoByFrom'
=>
[
'chat/AppChat/getUserInfoByFrom'
,
[
'method'
=>
'post|get'
]
],
'getUserInfoByFrom'
=>
[
'chat/AppChat/getUserInfoByFrom'
,
[
'method'
=>
'post|get'
]
],
'getChatRelation'
=>
[
'chat/AppChat/getChatRelation'
,
[
'method'
=>
'post|get'
]
],
'getChatRelation'
=>
[
'chat/AppChat/getChatRelation'
,
[
'method'
=>
'post|get'
]
],
'getSystemMessageByShop'
=>
[
'chat/AppChat/getSystemMessageByShop'
,
[
'method'
=>
'post|get'
]
],
'getSystemMessageByUser'
=>
[
'chat/AppChat/getSystemMessageByUser'
,
[
'method'
=>
'post|get'
]
],
]);
]);
Route
::
group
(
'task'
,
[
Route
::
group
(
'task'
,
[
...
@@ -622,10 +624,6 @@ Route::group('broker', [
...
@@ -622,10 +624,6 @@ Route::group('broker', [
'bargainMain'
=>
[
'api_broker/Bargain/bargainList'
,
[
'method'
=>
'POST|GET'
]
],
'bargainMain'
=>
[
'api_broker/Bargain/bargainList'
,
[
'method'
=>
'POST|GET'
]
],
]);
]);
//Route::miss('api/index/miss');//处理错误的url
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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