Commit ee558fcf authored by hujun's avatar hujun

变量名修改

parent 7d1d8713
......@@ -24,13 +24,14 @@ class HouseService
{
protected $house;
protected $agent;
protected $agetn_house;
protected $agent_house;
protected $push;
public function __construct()
{
$this->house = new GHouses();
$this->agent = new AAgents();
$this->agetn_house = new GHousesToAgents();
$this->agent_house = new GHousesToAgents();
$this->push = new PushMessageService();
}
......@@ -201,7 +202,7 @@ class HouseService
$agent_house_where['houses_id'] = $house_id;
$agent_house_where['type'] = $type;
$agent_data_old = $this->agetn_house->getAgentHouseAll('id,agents_id,houses_id', $agent_house_where);
$agent_data_old = $this->agent_house->getAgentHouseAll('id,agents_id,houses_id', $agent_house_where);
foreach ($agent_data_old['data'] as $k => $v) {
$agent_id_old[] = $v['agents_id'];
......@@ -228,15 +229,15 @@ class HouseService
}
}
$this->agetn_house->startTrans();
$this->agent_house->startTrans();
try {
//伪删除关系
if (!empty($update_data)) {
$this->agetn_house->updateUserAll($update_data);
$this->agent_house->updateUserAll($update_data);
}
if (!empty($insert_data)) {
$this->agetn_house->insertAll($insert_data);
$this->agent_house->insertAll($insert_data);
}
//处理盘方
......@@ -275,11 +276,11 @@ class HouseService
}
}
}
$this->agetn_house->commit();
$this->agent_house->commit();
$result['status'] = 'successful';
} catch (\Exception $e) {
$this->agetn_house->rollback();
$this->agent_house->rollback();
$result['status'] = 'fail';
$result['msg'] = $e->getMessage();
}
......
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