Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
7bccb7e1
Commit
7bccb7e1
authored
Apr 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
记录
parent
95f5bc49
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
HouseService.php
application/index/service/HouseService.php
+13
-19
No files found.
application/index/service/HouseService.php
View file @
7bccb7e1
...
@@ -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
();
//商铺扩展字段
//商铺扩展字段
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment