Commit 484ef8f2 authored by hujun's avatar hujun

独家合同上传

parent 83653517
...@@ -801,29 +801,29 @@ class GHouses extends BaseModel ...@@ -801,29 +801,29 @@ class GHouses extends BaseModel
$agents = new GHousesToAgents(); $agents = new GHousesToAgents();
$agents->addAgents($data['exclusive_id'], $house_id, 3, $operation_id); $agents->addAgents($data['exclusive_id'], $house_id, 3, $operation_id);
$m_house_file = new GHouseFile();
//新增附件 //新增附件
if (!empty($data['exclusive_file'])) { if (!empty($data['exclusive_file'])) {
$exclusive_file_arr = explode(',', $data['exclusive_file']); $exclusive_file_arr = explode(',', $data['exclusive_file']);
$m_house_file = new GHouseFile(); $save_data = [];
foreach ($exclusive_file_arr as $k=>$v) { foreach ($exclusive_file_arr as $k=>$v) {
$save_data['file_name'] = $v; $save_data[$k]['file_name'] = $v;
$save_data['house_id'] = $house_id; $save_data[$k]['house_id'] = $house_id;
$save_data['type'] = 0; $save_data[$k]['type'] = 0;
$save_data['status'] = 0; $save_data[$k]['status'] = 0;
$m_house_file->editData($save_data);
} }
$m_house_file->insertAll($save_data);
} }
//伪删除附件 //伪删除附件
if (!empty($data['del_file_id'])) { if (!empty($data['del_file_id'])) {
$file_id_arr = explode(',', $data['del_file_id']); $file_id_arr = explode(',', $data['del_file_id']);
$m_house_file = new GHouseFile();
foreach ($file_id_arr as $k=>$v) { foreach ($file_id_arr as $k=>$v) {
$save_data['status'] = 1; $m_house_file->where('id', $v)->update(['status'=>1]);
$m_house_file->editData($save_data, $v);
} }
} }
} }
if ($result == 1 || $ext_result == 1) { if ($result == 1 || $ext_result == 1) {
......
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