Commit 1f6f6c2f authored by hujun's avatar hujun

修改盘方推送文案

parent 8598fafc
......@@ -328,6 +328,7 @@ class PushMessageService
case 1 :
$result = $m_push->addHouseIdArray( $house_id, 0,$type, $data);break;
case 2 :
$data['house_id'] = $house_id;
$result = $m_push->addAgentIdArray( $agent_id, $operation_id, $type, $data);break;
}
return $result;
......
......@@ -89,7 +89,7 @@ class HouseService
//案场权限人
if (isset($data['agent_data'])) {
$result_agent_data = $this->releaseRelationship($data['agent_data'], $house_id, 1, $agent_id);
$result_agent_data = $this->releaseRelationship($data['agent_data'], $house_id, 1, $agent_id, $data['internal_title']);
if ($result_agent_data['status'] == 'fail') {
$result['status'] = 'fail';
......@@ -99,7 +99,7 @@ class HouseService
//盘方
if (isset($data['agent_dish'])) {
$result_agent_dish = $this->releaseRelationship($data['agent_dish'], $house_id, 2, $agent_id);
$result_agent_dish = $this->releaseRelationship($data['agent_dish'], $house_id, 2, $agent_id, $data['internal_title']);
if ($result_agent_dish['status'] == 'fail') {
$result['status'] = 'fail';
$result['msg'] = '新增或编辑盘方失败,' . $result_agent_dish['msg'];
......@@ -108,7 +108,7 @@ class HouseService
//独家方
if (isset($data['exclusive_ids'])) {
$result_exclusive_ids = $this->releaseRelationship($data['exclusive_ids'], $house_id, 3, $agent_id);
$result_exclusive_ids = $this->releaseRelationship($data['exclusive_ids'], $house_id, 3, $agent_id, $data['internal_title']);
if ($result_exclusive_ids['status'] == 'fail') {
$result['status'] = 'fail';
$result['msg'] = '新增或编辑独家方失败,' . $result_exclusive_ids['msg'];
......@@ -165,10 +165,11 @@ class HouseService
* @param $house_id
* @param $type
* @param $operation_id
* @param $house_title
* @return bool
* @throws \think\exception\PDOException
*/
public function releaseRelationship($agent_data, $house_id, $type, $operation_id)
public function releaseRelationship($agent_data, $house_id, $type, $operation_id, $house_title)
{
if (empty($agent_data)) {
return false;
......@@ -249,7 +250,8 @@ class HouseService
$remark = '删除盘方:' . implode(',', $del_agent_arr);
$records->record('', 2, $remark, $house_id);
$data['message'] = '盘方修改为:'. implode(',', $agent_name);
$operation_name = $this->agent->getAgentsById($operation_id, 'name');
$data['message'] = '你的【'.$house_title.'】商铺,盘方被【'.$operation_name.'】修改为:'. implode(',', $agent_name);
$this->push->record(2, $house_id, $del_agent_id, $operation_id, $data);
}
}
......
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