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
b90b7940
Commit
b90b7940
authored
Jun 13, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
f8dc92b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
OfficeRoom.php
application/index/controller/OfficeRoom.php
+10
-4
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+13
-11
No files found.
application/index/controller/OfficeRoom.php
View file @
b90b7940
...
...
@@ -214,10 +214,10 @@ class OfficeRoom extends Basic
$data
=
$this
->
params
;
$data
[
'id'
]
=
$this
->
params
[
'houses_id'
];
unset
(
$data
[
'houses_id'
]);
$
this
->
data
=
$this
->
service
->
edit
(
$data
,
$this
->
userId
,
$this
->
siteId
,
'exclusive'
);
if
(
$
this
->
data
[
'status'
]
==
'fail'
)
{
$
result
=
$this
->
service
->
edit
(
$data
,
$this
->
userId
,
$this
->
siteId
,
'exclusive'
);
if
(
$
result
[
'status'
]
==
'fail'
)
{
$this
->
code
=
101
;
$this
->
msg
=
$
this
->
data
[
'msg'
];
$this
->
msg
=
$
result
[
'msg'
];
}
}
else
{
$result
=
$this
->
service
->
delAgentHouse
(
3
,
$this
->
params
[
'houses_id'
]);
...
...
@@ -275,7 +275,13 @@ class OfficeRoom extends Basic
public
function
getExclusive
()
{
if
(
$this
->
params
[
'houses_id'
])
{
$this
->
data
=
$this
->
service
->
getExclusive
(
$this
->
params
[
'houses_id'
]);
$result
=
$this
->
service
->
getExclusive
(
$this
->
params
[
'houses_id'
]);
if
(
$result
[
'status'
]
==
'fail'
)
{
$this
->
msg
=
$result
[
'msg'
];
$this
->
code
=
101
;
}
else
{
$this
->
data
=
$result
[
'data'
];
}
}
else
{
$this
->
code
=
101
;
$this
->
msg
=
'houses_id is null'
;
...
...
application/index/service/OfficeRoomService.php
View file @
b90b7940
...
...
@@ -1359,23 +1359,24 @@ class OfficeRoomService
return
$result
;
}
$result
[
'id'
]
=
$data
[
'id'
];
$result
[
'is_exclusive_type'
]
=
$data
[
'is_exclusive_type'
];
$result
[
'agent_start_time'
]
=
$data
[
'agent_start_time'
];
$result
[
'agent_end_time'
]
=
$data
[
'agent_end_time'
];
$result_data
[
'id'
]
=
$data
[
'id'
];
$result_data
[
'is_exclusive_type'
]
=
$data
[
'is_exclusive_type'
];
$result_data
[
'agent_start_time'
]
=
$data
[
'agent_start_time'
];
$result_data
[
'agent_end_time'
]
=
$data
[
'agent_end_time'
];
$agent_data
=
$this
->
agent_room
->
getAgentsByRoomId
(
'b.id,b.name,b.phone'
,
[
'a.house_id'
=>
$room_id
,
'a.type'
=>
3
]);
if
(
$agent_data
[
0
])
{
$result
[
'name'
]
=
$agent_data
[
0
][
'name'
]
.
'-'
.
$agent_data
[
0
][
'phone'
];
$result
_data
[
'name'
]
=
$agent_data
[
0
][
'name'
]
.
'-'
.
$agent_data
[
0
][
'phone'
];
}
else
{
$result
[
'name'
]
=
''
;
$result
_data
[
'name'
]
=
''
;
}
$room_img
=
$this
->
m_office_img
->
getListAll
(
'img_name'
,[
'house_id'
=>
$room_id
,
'img_type'
=>
4
]);
if
(
$room_img
)
{
$result
[
'exclusive_img'
]
=
$room_img
;
$result
_data
[
'exclusive_img'
]
=
$room_img
;
}
else
{
$result
[
'exclusive_img'
]
=
[];
$result
_data
[
'exclusive_img'
]
=
[];
}
$house_file_where
[
'house_id'
]
=
$room_id
;
...
...
@@ -1385,11 +1386,12 @@ class OfficeRoomService
foreach
(
$exclusive_file
as
$k
=>
$v
)
{
$exclusive_file
[
$k
][
'file_name'
]
=
'/static/exclusive_file/'
.
$v
[
'file_name'
];
}
$result
[
'exclusive_file'
]
=
$exclusive_file
;
$result
_data
[
'exclusive_file'
]
=
$exclusive_file
;
}
else
{
$result
[
'exclusive_file'
]
=
[];
$result
_data
[
'exclusive_file'
]
=
[];
}
$result
[
'data'
]
=
$result_data
;
$result
[
'status'
]
=
'successful'
;
return
$result
;
}
...
...
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