Commit 35e756e8 authored by hujun's avatar hujun

去除注释

parent 54133e5d
......@@ -464,11 +464,6 @@ class Shop extends Basic
$result['data']['house_id'] = $house_id['house_id'];
$result['data']['internal_title'] = empty($this->params['internal_title']) ? "" : $this->params['internal_title'];
$result['msg'] = '新增或编辑成功';
if (isset($house_id['status']) && $house_id['status'] == 2) {
$push_service = new PushMessageService();
$push_service->pushHouseDownMessage($house_id['house_id']);
}
} else {
$data['code'] = 101;
$data['msg'] = 'Add houses failure';
......
......@@ -210,64 +210,13 @@ class PushMessageService
return $this->pushAgentAllDeviceId($agent_data['id'], '新增分佣', $content);
}
/**
* @param $house_id
* @param $operation_id
* @param $agent_id
* @param $push_str
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushHouseMessage($house_id, $operation_id, $agent_id, $push_str)
{
$agent = new AAgents();
$ccr_agent_data = $agent->getAgentInfo('name,phone', $operation_id);
$house = new GHouses();
$house_data = $house->getHouseInfoById('internal_title', [ 'id' => $house_id ]);
$content = '你的【' . $house_data['internal_title'] . '】商铺,盘方被【' . $ccr_agent_data['name'] . '-' . $ccr_agent_data['phone'] . '】修改为' . $push_str;
foreach ($agent_id as $k => $v) {
$this->pushAgentAllDeviceId($v, '修改盘方', $content, 'house_info', $house_id);
}
return;
}
/**
* 根据商铺id 推送下架消息
*
* @param $house_id
* @return bool|void
*/
public function pushHouseDownMessage($house_id)
{
$house = new GHouses();
try {
$house_data = $house->getHouseInfoById('internal_title', [ 'id' => $house_id ]);
$content = '你的【' . $house_data['internal_title'] . '】商铺下架,如需要上架,请编辑提交该商铺';
$house_agent = new GHousesToAgents();
$house_agent_data = $house_agent->getAgentList($house_id, 2, 'a.agents_id');
} catch (\Exception $e) {
return false;
}
foreach ($house_agent_data as $k => $v) {
$this->pushAgentAllDeviceId($v['agents_id'], '商铺下架', $content, 'house_info', $house_id);
}
return;
}
/**
* @param $id
* @param $title
* @param $content
* @param null $type
* @param null $user_id
* @return bool
* @return array|bool
*/
public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null)
{
......
......@@ -76,10 +76,10 @@ class Houses extends Basic
if ($house_id['house_id']) {
$return = $this->response($result['code'], $result['msg'], [ 'id', $house_id['house_id'] ]);
if (isset($house_id['status']) && $house_id['status'] == 2) {
$push_service = new PushMessageService();
$push_service->pushHouseDownMessage($house_id['house_id']);
}
// if (isset($house_id['status']) && $house_id['status'] == 2) {
// $push_service = new PushMessageService();
// $push_service->pushHouseDownMessage($house_id['house_id']);
// }
} else {
$return = $this->response(101, 'add houses is error');
}
......@@ -116,7 +116,8 @@ class Houses extends Basic
/**
* 新增和编辑商铺
*
* @return \think\Response|\think\response\View
* @return string|\think\Response|\think\response\View
* @throws \think\exception\PDOException
*/
public function editV2()
{
......
......@@ -137,8 +137,7 @@ class GHousesToAgents extends BaseModel
if (!empty($agent_id_old) && !empty($agent_push)) {
$push = new PushMessageService();
$agent_str = $agent_push_str . explode(',', $agent_push);
$push->pushHouseMessage($houses_id, $operation_id, $agent_id_old, $agent_str);
$this->push->record(1, [ 0 => $houses_id ], 0, $operation_id); //记录推送信息
}
return $res;
......
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