Commit 49d699cf authored by clone's avatar clone

系统消息

parent bc01c200
......@@ -22,6 +22,7 @@ use app\model\GHousesImgs;
use app\model\HouseImgs;
use app\model\HouseinfoExts;
use app\model\HouseInfos;
use app\model\MPushMessage;
use app\model\Users;
use think\Cache;
use think\Exception;
......@@ -361,7 +362,6 @@ class AppChat extends Basic
}
/**
* 获取聊天关系
* @return \think\Response
......@@ -409,9 +409,9 @@ class AppChat extends Basic
public function getUserInfoByFrom()
{
$params = $this->params;
/*$params = array(
'id' => 1,
);*/
/*$params = array(
'id' => 1,
);*/
if (!isset($params['id'])) {
return $this->response("300", "参数不全");
}
......@@ -422,16 +422,16 @@ class AppChat extends Basic
//3.ID
//4.手机号隐藏中间4位
$user = new Users();
$field = 'a.id,a.user_name,a.user_nick,a.user_phone,a.user_pic,a.other_pic';
$user = new Users();
$field = 'a.id,a.user_name,a.user_nick,a.user_phone,a.user_pic,a.other_pic';
$params_["a.id"] = $params['id'];
$result = $user->getAgentByUserId($field, $params_);
$result = $user->getAgentByUserId($field, $params_);
if (count($result) > 0) {
$result_["id"] = $result[0]["id"];
$result_["agent_id"] = 'agent_'.$result[0]["id"];
$result_["user_name"] = $result[0]["user_name"];
$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_["id"] = $result[0]["id"];
$result_["agent_id"] = 'agent_' . $result[0]["id"];
$result_["user_name"] = $result[0]["user_name"];
$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_phone"] = $result[0]["user_phone"];
return $this->response("200", "success!", $result_);
......@@ -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));
}
}
<?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
......@@ -211,4 +211,14 @@ class MPushMessage
}
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
......@@ -112,7 +112,7 @@ Route::group('index', [
'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方
'transformLandlord' => [ 'index/houses/transformLandlord', [ 'method' => 'post' ] ],//转换房东手机号
'lockHouse' => [ 'index/houses/lockHouse', [ 'method' => 'post' ] ],//锁盘
'getEditLog' => [ 'index/houses/getEditLog', [ 'method' => 'get' ] ],//商铺修改日志
'getEditLog' => [ 'index/houses/getEditLog', [ 'method' => 'get' ] ],//商铺修改日志
//版本管理
'version' => [ 'index/version/index', [ 'method' => 'get' ] ],
......@@ -142,29 +142,29 @@ Route::group('index', [
'updateRoleStatus' => [ 'index/auth/updateRoleStatus', [ 'method' => 'post' ] ], //--规则编辑【接口】
'agent' => [ 'index/agent/agent', [ 'method' => 'get' ] ], //首页列表界面
'saveAgentIndex' => [ 'index/agent/saveAgentIndex', [ 'method' => 'get' ] ], //编辑列表列表界面
'AgentList' => [ 'index/agent/AgentList', [ 'method' => 'get' ] ], //首页列表【接口】
'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】
'updateStatus' => [ 'index/agent/updateStatus', [ 'method' => 'post' ] ], //状态修改【接口】
'updateRole' => [ 'index/agent/updateRole', [ 'method' => 'post' ] ], //经纪人角色修改【接口】
'deviceList' => [ 'index/agent/deviceList', [ 'method' => 'post|get' ] ], //经纪人设备id绑定列表
'updateDevice' => [ 'index/agent/updateDevice', [ 'method' => 'post|get' ] ],//解绑或绑定经纪人设备id
'agent' => [ 'index/agent/agent', [ 'method' => 'get' ] ], //首页列表界面
'saveAgentIndex' => [ 'index/agent/saveAgentIndex', [ 'method' => 'get' ] ], //编辑列表列表界面
'AgentList' => [ 'index/agent/AgentList', [ 'method' => 'get' ] ], //首页列表【接口】
'saveAgent' => [ 'index/agent/saveAgent', [ 'method' => 'get|post' ] ], //修改经纪人【接口】
'updateStatus' => [ 'index/agent/updateStatus', [ 'method' => 'post' ] ], //状态修改【接口】
'updateRole' => [ 'index/agent/updateRole', [ 'method' => 'post' ] ], //经纪人角色修改【接口】
'deviceList' => [ 'index/agent/deviceList', [ 'method' => 'post|get' ] ], //经纪人设备id绑定列表
'updateDevice' => [ 'index/agent/updateDevice', [ 'method' => 'post|get' ] ],//解绑或绑定经纪人设备id
//客户标签
'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面
'updateULabel' => [ 'index/label/updateULabel', [ 'method' => 'post|get' ] ], //编辑添加客户标签
'getUserLabel' => [ 'index/label/getUserLabel', [ 'method' => 'get' ] ], //获取客户状态
'getULabelsList' => [ 'index/label/getULabelsList', [ 'method' => 'get' ] ], //客户标签列表接口/界面
'updateULabel' => [ 'index/label/updateULabel', [ 'method' => 'post|get' ] ], //编辑添加客户标签
'getUserLabel' => [ 'index/label/getUserLabel', [ 'method' => 'get' ] ], //获取客户状态
//商圈
'editBusinessDistrict' => [ 'index/BusinessDistrict/edit', [ 'method' => 'get | post' ] ], //编辑商圈
'delBusinessDistrict' => [ 'index/BusinessDistrict/del', [ 'method' => 'post' ] ], //删除商圈列表
'editBusinessDistrict' => [ 'index/BusinessDistrict/edit', [ 'method' => 'get | post' ] ], //编辑商圈
'delBusinessDistrict' => [ 'index/BusinessDistrict/del', [ 'method' => 'post' ] ], //删除商圈列表
//商铺
'BusinessList' => [ 'index/BusinessDistrict/getBusiness', [ 'method' => 'get' ] ], //获取商圈
'getBusinessAll' => [ 'index/BusinessDistrict/getBusinessAll', [ 'method' => 'get' ] ], //获取商圈,不带分页
'houseEdit' => [ 'index/Houses/editV2', [ 'method' => 'get|post' ] ], //编辑商铺
'houseAdd' => [ 'index/Houses/editV2', [ 'method' => 'get' ] ], //新增商铺
'BusinessList' => [ 'index/BusinessDistrict/getBusiness', [ 'method' => 'get' ] ], //获取商圈
'getBusinessAll' => [ 'index/BusinessDistrict/getBusinessAll', [ 'method' => 'get' ] ], //获取商圈,不带分页
'houseEdit' => [ 'index/Houses/editV2', [ 'method' => 'get|post' ] ], //编辑商铺
'houseAdd' => [ 'index/Houses/editV2', [ 'method' => 'get' ] ], //新增商铺
'houseDel' => [ 'index/Houses/del', [ 'method' => 'post' ] ], //删除商铺
'regions' => [ 'index/BusinessDistrict/regions', [ 'method' => 'get' ] ], //获取省市区数据
......@@ -292,10 +292,8 @@ Route::group('index', [
'performancesubsidiaryList' => [ 'index/PerformanceSubsidiary/performancesubsidiaryList', [ 'method' => 'POST|GET' ] ],//业绩明细liu
'myCollectionUserList' => [ 'index/myCollectionUser/myCollectionUserList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'myCollectionShopList' => [ 'index/myCollectionShop/myCollectionShopList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'inviteStatistics' => [ 'index/InviteStatistics/inviteStatisticsList', [ 'method' => 'POST|GET' ] ],//邀请注册liu
'operationalData' => [ 'index/OperationalData/operationalDataList', [ 'method' => 'POST|GET' ] ],//运营数据统计liu
'inviteStatistics' => [ 'index/InviteStatistics/inviteStatisticsList', [ 'method' => 'POST|GET' ] ],//邀请注册liu
'operationalData' => [ 'index/OperationalData/operationalDataList', [ 'method' => 'POST|GET' ] ],//运营数据统计liu
'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志
......@@ -306,17 +304,17 @@ Route::group('index', [
'selectIndividualPerformance' => [ 'index/Performance/selectIndividualPerformance', [ 'method' => 'POST|GET' ] ], //个人业绩排行 朱伟 2018-07-31
'transformFollowUp' => [ 'index/HouseFollowUp/transformFollowUp', [ 'method' => 'GET' ] ], //个人业绩排行 朱伟 2018-07-31
'getPerformanceExcel' => [ 'index/Performance/getPerformanceExcel', [ 'method' => 'POST|GET' ] ],
'pictureShow' => [ 'index/PictureShow/pictureShow', [ 'method' => 'POST|GET' ] ], //商铺图库 杜欣源 2018-08-31
'pictureShow' => [ 'index/PictureShow/pictureShow', [ 'method' => 'POST|GET' ] ], //商铺图库 杜欣源 2018-08-31
//c端商铺图库相关
'addImageDepot' => [ 'index/ImageDepot/addImageDepot', [ 'method' => 'get | post' ] ],//上传保存图片
'getImageTypeLabel' => [ 'index/ImageDepot/getImageTypeLabel', [ 'method' => 'get | post' ] ],//获取图片类型与标签
'getImageDepotList' => [ 'index/ImageDepot/getImageDepotList', [ 'method' => 'get | post' ] ],//获取图片列表
'getImageDepotById' => [ 'index/ImageDepot/getImageDepotById', [ 'method' => 'get | post' ] ],//根据ID获取记录
'delImageDepot' => [ 'index/ImageDepot/delImageDepot', [ 'method' => 'get | post' ] ],//删除
'ceshi' => [ 'index/ImageDepot/ceshi', [ 'method' => 'get | post' ] ],//
'addImageDepot' => [ 'index/ImageDepot/addImageDepot', [ 'method' => 'get | post' ] ],//上传保存图片
'getImageTypeLabel' => [ 'index/ImageDepot/getImageTypeLabel', [ 'method' => 'get | post' ] ],//获取图片类型与标签
'getImageDepotList' => [ 'index/ImageDepot/getImageDepotList', [ 'method' => 'get | post' ] ],//获取图片列表
'getImageDepotById' => [ 'index/ImageDepot/getImageDepotById', [ 'method' => 'get | post' ] ],//根据ID获取记录
'delImageDepot' => [ 'index/ImageDepot/delImageDepot', [ 'method' => 'get | post' ] ],//删除
'ceshi' => [ 'index/ImageDepot/ceshi', [ 'method' => 'get | post' ] ],//
//运营数相关接口
'operationChatUserNum' => [ 'index/OperationData/chatUserNum', [ 'method' => 'get | post' ] ],//
......@@ -404,8 +402,6 @@ Route::group('api', [
'saveSiteCity' => [ 'api/Location/saveSiteCity', [ 'method' => 'POST|GET' ] ], //保存默认城市选择 c端
]);
Route::group('chat', [
......@@ -426,6 +422,12 @@ Route::group('chat', [
'pushMsg_gethouseinfo' => [ 'chat/AppChat/getHouseInfoByFrom', [ 'method' => 'post|get' ] ],
'getUserInfoByFrom' => [ 'chat/AppChat/getUserInfoByFrom', [ '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', [
......@@ -457,7 +459,7 @@ Route::group('task', [
'updateShopTask' => [ 'task/JobTask/updateShopTask', [ 'method' => 'post | get' ] ], //默认跟进
'updateShopImageIdTask' => [ 'task/JobTask/updateShopImageIdTask', [ 'method' => 'post | get' ] ], //默认图片
'push' => [ 'task/PushMessageTask/push', [ 'method' => 'get' ] ] //推送
'push' => [ 'task/PushMessageTask/push', [ 'method' => 'get' ] ] //推送
]);
Route::group('broker', [
......@@ -568,30 +570,30 @@ Route::group('broker', [
'getFeedInfo' => [ 'api_broker/Feed/getFeedInfo', [ 'method' => 'get' ] ], //feed流喜报详情
'editDecFeedClick' => [ 'api_broker/Feed/editDecFeedClick', [ 'method' => 'post' ] ], //feed流喜报详情
'getAgentsResidueNumList' => [ 'api_broker/LookShop/getAgentsResidueNumList', [ 'method' => 'get' ] ], //剩余铺数列表
'getAgentsResidueNumList' => [ 'api_broker/LookShop/getAgentsResidueNumList', [ 'method' => 'get' ] ], //剩余铺数列表
'getAgentsResidueNumListV2' => [ 'api_broker/LookShop/getAgentsResidueNumListV2', [ 'method' => 'get' ] ], //
'setAgentLookNum' => [ 'api_broker/LookShop/setAgentLookNum', [ 'method' => 'post' ] ], //设置经纪人的看铺数量
'setAgentLookNum' => [ 'api_broker/LookShop/setAgentLookNum', [ 'method' => 'post' ] ], //设置经纪人的看铺数量
//首页跟进记录
'userFollowUpList' => [ 'api_broker/HomePageLog/userFollowUpList', [ 'method' => 'post' ] ],
'houseFollowUpList' => [ 'api_broker/HomePageLog/houseFollowUpList', [ 'method' => 'post' ] ],
'housingResource' => [ 'api_broker/Performance/housingResource', [ 'method' => 'POST|GET' ] ], //获取房源list
'userResource' => [ 'api_broker/Performance/userResource', [ 'method' => 'POST|GET' ] ], //获取客源list
'followList' => [ 'api_broker/Performance/followList', [ 'method' => 'POST|GET' ] ], //报备list
'marchInList' => [ 'api_broker/Performance/marchInList', [ 'method' => 'POST|GET' ] ], //进场list
'paylogList' => [ 'api_broker/Performance/paylogList', [ 'method' => 'POST|GET' ] ], //收款list
'performanceList' => [ 'api_broker/Performance/performanceList', [ 'method' => 'POST|GET' ] ], //业绩list
'superviseList' => [ 'api_broker/Performance/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行list
'officialReceiptsList' => [ 'api_broker/Performance/officialReceiptsList', [ 'method' => 'POST|GET' ] ], //实收list
'paylogListPcInfo' => [ 'api_broker/Performance/paylogListPcInfo', [ 'method' => 'POST|GET' ] ], //
'marchInListPcInfo' => [ 'api_broker/Performance/marchInListPcInfo', [ 'method' => 'POST|GET' ] ], //
'followListPcInfo' => [ 'api_broker/Performance/followListPcInfo', [ 'method' => 'POST|GET' ] ], //报备
'housingResourcePcInfo' => [ 'api_broker/Performance/housingResourcePcInfo', [ 'method' => 'POST|GET' ] ], //新增商铺
'userResourcePcInfo' => [ 'api_broker/Performance/userResourcePcInfo', [ 'method' => 'POST|GET' ] ], //新增客户
'teamNumPcInfo' => [ 'api_broker/Performance/teamNumPcInfo', [ 'method' => 'POST|GET' ] ], //团队人数
'bargainSumPcInfo' => [ 'api_broker/Performance/bargainSumPcInfo', [ 'method' => 'POST|GET' ] ], //成交单数
'userFollowUpList' => [ 'api_broker/HomePageLog/userFollowUpList', [ 'method' => 'post' ] ],
'houseFollowUpList' => [ 'api_broker/HomePageLog/houseFollowUpList', [ 'method' => 'post' ] ],
'housingResource' => [ 'api_broker/Performance/housingResource', [ 'method' => 'POST|GET' ] ], //获取房源list
'userResource' => [ 'api_broker/Performance/userResource', [ 'method' => 'POST|GET' ] ], //获取客源list
'followList' => [ 'api_broker/Performance/followList', [ 'method' => 'POST|GET' ] ], //报备list
'marchInList' => [ 'api_broker/Performance/marchInList', [ 'method' => 'POST|GET' ] ], //进场list
'paylogList' => [ 'api_broker/Performance/paylogList', [ 'method' => 'POST|GET' ] ], //收款list
'performanceList' => [ 'api_broker/Performance/performanceList', [ 'method' => 'POST|GET' ] ], //业绩list
'superviseList' => [ 'api_broker/Performance/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行list
'officialReceiptsList' => [ 'api_broker/Performance/officialReceiptsList', [ 'method' => 'POST|GET' ] ], //实收list
'paylogListPcInfo' => [ 'api_broker/Performance/paylogListPcInfo', [ 'method' => 'POST|GET' ] ], //
'marchInListPcInfo' => [ 'api_broker/Performance/marchInListPcInfo', [ 'method' => 'POST|GET' ] ], //
'followListPcInfo' => [ 'api_broker/Performance/followListPcInfo', [ 'method' => 'POST|GET' ] ], //报备
'housingResourcePcInfo' => [ 'api_broker/Performance/housingResourcePcInfo', [ 'method' => 'POST|GET' ] ], //新增商铺
'userResourcePcInfo' => [ 'api_broker/Performance/userResourcePcInfo', [ 'method' => 'POST|GET' ] ], //新增客户
'teamNumPcInfo' => [ 'api_broker/Performance/teamNumPcInfo', [ 'method' => 'POST|GET' ] ], //团队人数
'bargainSumPcInfo' => [ 'api_broker/Performance/bargainSumPcInfo', [ 'method' => 'POST|GET' ] ], //成交单数
//user
......@@ -620,10 +622,6 @@ Route::group('broker', [
'bargainMain' => [ 'api_broker/Bargain/bargainList', [ 'method' => 'POST|GET' ] ],
]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment