Commit f796db04 authored by hujun's avatar hujun

//

parent bffb0a81
......@@ -672,6 +672,7 @@ class AppChat extends Basic
return $this->response("101", "请求参数错误");
}
$msgModel = new MPushMessage();
$msg_check_model= new MPushCheckMessage();
//修改已读消息
if (!empty($params['read_ids'])) {
$where_arr["id"] = array("in", $params["read_ids"]);
......@@ -691,9 +692,37 @@ class AppChat extends Basic
$data["report_count"] = $msgModel->getListCountByWhere($param);
$param["type"] = array("in", "10,11");
$data["square_count"] = $msgModel->getListCountByWhere($param);
$data['check_count'] = $msg_check_model->getTotal(['addressee_id'=>$params['agent_id'],'is_del'=> 0]); //审核信息
return $this->response("200", "success", $data);
}
/**
* 审核消息已读
*
* @return \think\Response
*/
public function updateSystemMessageCheckIsRead()
{
$params = $this->params;
/* $params = array(
"agent_id" => 1,//经纪人id
"read_ids" => "1,2,3" //需要修改的消息id
);*/
if (empty($params['agent_id'])) {
return $this->response("101", "请求参数错误");
}
$msg_check_model= new MPushCheckMessage();
//修改已读消息
if (!empty($params['read_ids'])) {
$where_arr["id"] = array("in", $params["read_ids"]);
$where_arr["is_read"] = 0;
$update_arr["is_read"] = 1;
$msg_check_model->updateIsRead($where_arr, $update_arr);
}
return $this->response("200", "success");
}
/**
* 获取未读消息
* @return \think\Response
......
......@@ -41,7 +41,7 @@ class AAgentBankValidate extends Validate
'id_card_image_back.require' => '身份证背面必传',
];
protected $scene = [
'add' => 'agent_id,account,bank,card_no,id_card,id_card_image_front,id_card_image_back',
'edit' => 'id,agent_id,account,bank,card_no,id_card',
'add' => 'agent_id,account,bank,card_no',
'edit' => 'id,agent_id,account,bank,card_no',
];
}
\ No newline at end of file
......@@ -482,6 +482,7 @@ Route::group('index', [
'delAgentsBlackListImg' => ['index/broker/delAgentsBlackListImg', ['method' => 'GET|POST']],//黑名单删除图片
'getSystemMessageByUser' => ['index/broker/getSystemMessageByUser', ['method' => 'GET']],//未读消息列表
'updateSystemMessageIsRead' => ['index/broker/updateSystemMessageIsRead', ['method' => 'POST']],//已读状态
'updateSystemMessageCheckIsRead' => ['index/broker/updateSystemMessageCheckIsRead', ['method' => 'POST']],//审核消息-已读状态
'userDetail' => ['index/UserLog/userDetail', ['method' => 'get|post']],
'userLog' => ['index/UserLog/userLog', ['method' => 'get|post']],
......
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