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
9f3165dc
Commit
9f3165dc
authored
Jun 21, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段修改记录
parent
1bdf8dd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+59
-0
No files found.
application/index/service/OfficeRoomService.php
View file @
9f3165dc
...
...
@@ -80,6 +80,7 @@ class OfficeRoomService
if
(
empty
(
$scene
))
{
if
(
isset
(
$data
[
'id'
]))
{
$scene
=
'edit'
;
$this
->
editChangeLog
(
$data
,
$data
[
'id'
],
$agent_id
);
//修改日志记录
}
else
{
$scene
=
'add'
;
}
...
...
@@ -1583,4 +1584,61 @@ class OfficeRoomService
}
return
$result
;
}
/**
* 楼盘房源相关字段日志记录
*
* @param $data
* @param $room_id
* @param $agent_id
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
editChangeLog
(
$data
,
$room_id
,
$agent_id
)
{
$field
=
'mansion,room_number,floor,is_exclusive_type,area,is_rent'
;
$room_data
=
$this
->
m_office_room
->
getFindData
(
$field
,
[
'id'
=>
$room_id
]);
$remark
=
[];
if
(
$room_data
[
'mansion'
]
!=
$data
[
'mansion'
])
{
$remark
[]
=
'楼号/栋/座由('
.
$room_data
[
'mansion'
]
.
')修改为('
.
$data
[
'mansion'
]
.
')'
;
}
if
(
$room_data
[
'room_number'
]
!=
$data
[
'room_number'
])
{
$remark
[]
=
'门牌号由('
.
$room_data
[
'room_number'
]
.
')修改为('
.
$data
[
'room_number'
]
.
')'
;
}
if
(
$room_data
[
'floor'
]
!=
$data
[
'floor'
])
{
$remark
[]
=
'所在楼层由('
.
$room_data
[
'floor'
]
.
')修改为('
.
$data
[
'floor'
]
.
')'
;
}
if
(
$room_data
[
'is_exclusive_type'
]
!=
$data
[
'is_exclusive_type'
])
{
//是否独家0否1是
if
(
$room_data
[
'is_exclusive_type'
])
{
$remark
[]
=
'是否独家改为是'
;
}
else
{
$remark
[]
=
'是否独家改为否'
;
}
}
if
(
$room_data
[
'area'
]
!=
$data
[
'area'
])
{
$remark
[]
=
'面积由('
.
$room_data
[
'area'
]
.
')修改为('
.
$data
[
'area'
]
.
')'
;
}
if
(
$room_data
[
'is_rent'
]
!=
$data
[
'is_rent'
])
{
//是否已租 0未租 1已租
if
(
$room_data
[
'is_rent'
])
{
$remark
[]
=
'是否已租改为已租'
;
}
else
{
$remark
[]
=
'是否已租改为未租'
;
}
}
if
(
!
empty
(
$remark
))
{
$m_operating
=
new
OfficeGOperatingRecord
();
$m_operating
->
record
(
$agent_id
,
2
,
$remark
,
$data
[
'id'
]);
}
return
;
}
}
\ No newline at end of file
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