Commit d9239b18 authored by clone's avatar clone

1

parent 238410c4
......@@ -1208,17 +1208,59 @@ class Broker extends Basic
*/
public function editBank()
{
$msg = '';
$code = 200;
$msg = '';
$code = 200;
$s_broker = new \app\index\service\BrokerService();
$result = $s_broker->editBank($this->params, $this->params['agent_id']);
$result = $s_broker->editBank($this->params, $this->params['agent_id']);
if ($result['status'] == 'fail') {
$code = 101;
$msg = $result['msg'];
$msg = $result['msg'];
}
return $this->response($code, $msg);
}
/**
* 查询经纪人的监管人
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getSuperintendent()
{
$agent_id = $this->request->param("agent_id");
if (!$agent_id) {
return $this->response(101, '经纪人id不能为空');
}
$redisCache = new RedisCacheService();
$agentInfo = $redisCache->getRedisCache(2, $agent_id);
$result["superintendent_name"] = "";
$params = [];
if ($agentInfo["level"] == 10) {
$params["store_id"] = $agentInfo["store_id"];
$params["level"] = array("in", "20,40");
$params["status"] = 0;
} else if ($agentInfo["level"] == 20) {
$params["district_id"] = $agentInfo["district_id"];
$params["level"] = array("in", "30,40");
$params["status"] = array("in", "0,1,3");//总监可能转勤
} else {
$result["superintendent_name"] = "施总";
}
if (!$result["superintendent_name"]) {
$agentModel = new AAgents();
$info = $agentModel->getAgentById("id,name", $params);
if ($info) {
$result["superintendent_name"] = $info[0]["name"];
}
}
if (count($result) > 0) {
return $this->response("200", "success", $result);
} else {
return $this->response("101", "账号异常");
}
}
}
\ No newline at end of file
......@@ -263,7 +263,7 @@ class AAgents extends BaseModel
$result = $this->field($field)
->where($where_)
->select();
// echo $this->getLastSql();
echo $this->getLastSql();
return $result;
}
......
......@@ -476,12 +476,12 @@ Route::group('index', [
'downloadFile' => ['index/news/downloadFile', ['method' => 'GET|POST']], //新增商学院资讯
'addAgentsBlackList' => ['index/broker/addAgentsBlackList', ['method' => 'GET|POST']],//添加黑名单
'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']],//已读状态
'addAgentsBlackList' => ['index/broker/addAgentsBlackList', ['method' => 'GET|POST']],//添加黑名单
'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']],
......@@ -685,31 +685,31 @@ Route::group('api', [
]);
Route::group('chat', [
'index' => ['chat/AppChat/index', ['method' => 'get']],
'userChat' => ['chat/AppChat/userChat', ['method' => 'post|get']],
'userChatV2' => ['chat/AppChat/userChatV2', ['method' => 'post|get']],
'pushMsg' => ['chat/AppChat/pushMsg', ['method' => 'post|get']],
'getChatHistory' => ['chat/AppChat/getChatHistory', ['method' => 'post|get']],
'getUserOrAgentInfo' => ['chat/AppChat/getUserOrAgentInfo', ['method' => 'post|get']],
'uploadImg' => ['chat/AppChat/uploadImg', ['method' => 'post|get']],
'createGroupByOnlyId' => ['chat/Group/createGroupByOnlyId', ['method' => 'post|get']],
'delGroup' => ['chat/Group/delGroup', ['method' => 'post|get']],
'getGroupUser' => ['chat/Group/getGroupUser', ['method' => 'post|get']],
'addGroupUserByIds' => ['chat/Group/addGroupUserByIds', ['method' => 'post|get']],
'delGroupUserByIds' => ['chat/Group/delGroupUserByIds', ['method' => 'post|get']],
'addGroupManage' => ['chat/Group/addGroupManage', ['method' => 'post|get']],
'delGroupManage' => ['chat/Group/delGroupManage', ['method' => 'post|get']],
'pushMsg_gethouseinfo' => ['chat/AppChat/getHouseInfoByFrom', ['method' => 'post|get']],
'getOfficeRoomInfo' => ['chat/AppChat/getOfficeRoomInfo', ['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']],
'getSystemMessageByReport' => ['chat/AppChat/getSystemMessageByReport', ['method' => 'post|get']],
'getSquareMessageByAgentId' => ['chat/AppChat/getSquareMessageByAgentId', ['method' => 'post|get']],
'getCheckMessageByAgentId' => ['chat/AppChat/getCheckMessageByAgentId', ['method' => 'get']],
'updateSystemMessageIsRead' => ['chat/AppChat/updateSystemMessageIsRead', ['method' => 'post|get']],
'getMessageIsRead' => ['chat/AppChat/getMessageIsRead', ['method' => 'post|get']],
'index' => ['chat/AppChat/index', ['method' => 'get']],
'userChat' => ['chat/AppChat/userChat', ['method' => 'post|get']],
'userChatV2' => ['chat/AppChat/userChatV2', ['method' => 'post|get']],
'pushMsg' => ['chat/AppChat/pushMsg', ['method' => 'post|get']],
'getChatHistory' => ['chat/AppChat/getChatHistory', ['method' => 'post|get']],
'getUserOrAgentInfo' => ['chat/AppChat/getUserOrAgentInfo', ['method' => 'post|get']],
'uploadImg' => ['chat/AppChat/uploadImg', ['method' => 'post|get']],
'createGroupByOnlyId' => ['chat/Group/createGroupByOnlyId', ['method' => 'post|get']],
'delGroup' => ['chat/Group/delGroup', ['method' => 'post|get']],
'getGroupUser' => ['chat/Group/getGroupUser', ['method' => 'post|get']],
'addGroupUserByIds' => ['chat/Group/addGroupUserByIds', ['method' => 'post|get']],
'delGroupUserByIds' => ['chat/Group/delGroupUserByIds', ['method' => 'post|get']],
'addGroupManage' => ['chat/Group/addGroupManage', ['method' => 'post|get']],
'delGroupManage' => ['chat/Group/delGroupManage', ['method' => 'post|get']],
'pushMsg_gethouseinfo' => ['chat/AppChat/getHouseInfoByFrom', ['method' => 'post|get']],
'getOfficeRoomInfo' => ['chat/AppChat/getOfficeRoomInfo', ['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']],
'getSystemMessageByReport' => ['chat/AppChat/getSystemMessageByReport', ['method' => 'post|get']],
'getSquareMessageByAgentId' => ['chat/AppChat/getSquareMessageByAgentId', ['method' => 'post|get']],
'getCheckMessageByAgentId' => ['chat/AppChat/getCheckMessageByAgentId', ['method' => 'get']],
'updateSystemMessageIsRead' => ['chat/AppChat/updateSystemMessageIsRead', ['method' => 'post|get']],
'getMessageIsRead' => ['chat/AppChat/getMessageIsRead', ['method' => 'post|get']],
'updateSystemMessageCheckIsRead' => ['chat/AppChat/updateSystemMessageCheckIsRead', ['method' => 'post|get']],//审核消息
]);
......@@ -829,6 +829,7 @@ Route::group('broker', [
'updateBindAXB' => ['api_broker/CellPhone/updateBindAXB', ['method' => 'post']], //更新绑定关系隐私号码
'getCallLog' => ['api_broker/broker/getCallLog', ['method' => 'get|post']],
'editBank' => ['api_broker/broker/editBank', ['method' => 'post']], //我的-工资卡
'getSuperintendent' => ['api_broker/broker/getSuperintendent', ['method' => 'post|get']],
'agentUserTb' => ['api_broker/Client/agentUserTb', ['method' => '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