Commit 7bccb7e1 authored by hujun's avatar hujun

记录

parent 95f5bc49
...@@ -56,6 +56,7 @@ class HouseService ...@@ -56,6 +56,7 @@ class HouseService
*/ */
public function addHouse(array $data, int $agent_id, $is_app = 0, $site_id, $operation_type = ''): array public function addHouse(array $data, int $agent_id, $is_app = 0, $site_id, $operation_type = ''): array
{ {
$remark = '';
$result = []; $result = [];
$validate = new HouseValidate(); $validate = new HouseValidate();
$check_address = 1; $check_address = 1;
...@@ -81,8 +82,6 @@ class HouseService ...@@ -81,8 +82,6 @@ class HouseService
return $result; return $result;
} }
try { try {
if ($check_address) { if ($check_address) {
$check_where['internal_address'] = trim($data['internal_address']); $check_where['internal_address'] = trim($data['internal_address']);
...@@ -106,8 +105,16 @@ class HouseService ...@@ -106,8 +105,16 @@ class HouseService
} }
} }
if (!empty($landlord_phone_new)) {
$landlord_phone_old = $this->landlordPhoneEditV2($landlord_phone_new, $data['id']);
if (!empty($landlord_phone_old)) {
$remark .= implode(',', $landlord_phone_old).',';
}
}
if (!empty($data['id'])) { if (!empty($data['id'])) {
$house_data = $this->m_house->getHouseInfo('id,internal_address,internal_title,shop_area_start,is_vip', ['id' => $data['id']]); $house_data = $this->m_house->getHouseInfo('id,internal_address,internal_title,shop_area_start,is_vip,residue_num', ['id' => $data['id']]);
if (empty($house_data[0]['id'])) { if (empty($house_data[0]['id'])) {
$result['status'] = 'fail'; $result['status'] = 'fail';
$result['msg'] = '没有该商铺信息'; $result['msg'] = '没有该商铺信息';
...@@ -127,9 +134,7 @@ class HouseService ...@@ -127,9 +134,7 @@ class HouseService
} }
} }
$m_operating = new GOperatingRecords(); $m_operating = new GOperatingRecords();
if ($data['residue_num'] != $house_data[0]['residue_num']) {
$remark = '';
if (isset($data['residue_num'])) {
$remark = '修改为:剩余铺数' . $data['residue_num']; $remark = '修改为:剩余铺数' . $data['residue_num'];
} }
if ($data['is_exclusive_type'] == 1) { if ($data['is_exclusive_type'] == 1) {
...@@ -144,19 +149,13 @@ class HouseService ...@@ -144,19 +149,13 @@ class HouseService
$remark .= ',地址改为:' . $data['internal_address']; $remark .= ',地址改为:' . $data['internal_address'];
} }
if (!empty($landlord_phone_new)) {
$landlord_phone_old = $this->landlordPhoneEditV2($landlord_phone_new, $data['id']);
if (!empty($landlord_phone_old)) {
$remark .= implode(',', $landlord_phone_old);
}
}
if (!empty($data['shop_area_start']) && $data['shop_area_start'] != $house_data[0]['shop_area_start']) { if (!empty($data['shop_area_start']) && $data['shop_area_start'] != $house_data[0]['shop_area_start']) {
$remark .= ',街铺面积:'.$house_data[0]['shop_area_start'].'修改为'.$data['shop_area_start']; $remark .= ',街铺面积:'.$house_data[0]['shop_area_start'].'修改为'.$data['shop_area_start'];
} }
if (!empty($remark)) {
$m_operating->record($agent_id, 6, $remark, $data['id']); $m_operating->record($agent_id, 6, $remark, $data['id']);
}
if (empty($data['is_exclusive_type'])) { if (empty($data['is_exclusive_type'])) {
$this->delAgentHouse(3, $data['id'], 0); $this->delAgentHouse(3, $data['id'], 0);
...@@ -172,11 +171,6 @@ class HouseService ...@@ -172,11 +171,6 @@ class HouseService
return $result; return $result;
} }
//新增房东手机号
if (empty($data['id']) && !empty($landlord_phone_new)) {
$this->landlordPhoneEdit($landlord_phone_new, $house_id);
}
$house_img = new GHousesImgs(); $house_img = new GHousesImgs();
//商铺扩展字段 //商铺扩展字段
......
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