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
eb13b8dd
Commit
eb13b8dd
authored
Nov 21, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常捕获
parent
4fac74d6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
VipService.php
application/api_broker/service/VipService.php
+1
-1
HouseService.php
application/index/service/HouseService.php
+19
-15
No files found.
application/api_broker/service/VipService.php
View file @
eb13b8dd
...
...
@@ -17,7 +17,7 @@ class VipService
/**
* 是否具有查看vip客户权限
*
* @param $id 经纪人ID
* @param $id
//
经纪人ID
* @param string $name
* @return int 是否可以查看vip客户 0:可查看 1:不可查看
*/
...
...
application/index/service/HouseService.php
View file @
eb13b8dd
...
...
@@ -24,17 +24,19 @@ use app\task\controller\ResultsSummaryNewTask;
class
HouseService
{
protected
$house
;
protected
$
m_
house
;
protected
$agent
;
protected
$agent_house
;
protected
$push
;
protected
$m_house_ext
;
public
function
__construct
()
{
$this
->
house
=
new
GHouses
();
$this
->
m_
house
=
new
GHouses
();
$this
->
agent
=
new
AAgents
();
$this
->
agent_house
=
new
GHousesToAgents
();
$this
->
push
=
new
PushMessageService
();
$this
->
m_house_ext
=
new
GHousesExt
();
}
/**
...
...
@@ -44,7 +46,6 @@ class HouseService
* @param int $agent_id
* @param int $is_app
* @return array
* @throws \think\exception\PDOException
*/
public
function
addHouse
(
array
$data
,
int
$agent_id
,
$is_app
=
0
)
:
array
{
...
...
@@ -69,8 +70,9 @@ class HouseService
return
$result
;
}
try
{
if
(
!
empty
(
$data
[
'id'
]))
{
$house_data
=
$this
->
house
->
getHouseInfo
(
'id,internal_address,internal_title'
,
[
'id'
=>
$data
[
'id'
]]);
$house_data
=
$this
->
m_house
->
getHouseInfo
(
'id,internal_address,internal_title'
,
[
'id'
=>
$data
[
'id'
]]);
if
(
empty
(
$house_data
[
0
][
'id'
]))
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
'没有该商铺信息'
;
...
...
@@ -78,21 +80,20 @@ class HouseService
}
$m_operating
=
new
GOperatingRecords
();
$remark
=
'修改为:剩余铺数'
.
$data
[
'residue_num'
];
$remark
=
'修改为:剩余铺数'
.
$data
[
'residue_num'
];
if
(
$data
[
'is_exclusive_type'
]
==
1
)
{
$remark
.=
',独家有效期 '
.
$data
[
'agent_start_time'
]
.
'—'
.
$data
[
'agent_end_time'
];
$remark
.=
',独家有效期 '
.
$data
[
'agent_start_time'
]
.
'—'
.
$data
[
'agent_end_time'
];
}
if
(
$data
[
'internal_title'
]
!=
$house_data
[
0
][
'internal_title'
])
{
$remark
.=
',商铺名改为:'
.
$data
[
'internal_title'
];
$remark
.=
',商铺名改为:'
.
$data
[
'internal_title'
];
}
if
(
$data
[
'internal_address'
]
!=
$house_data
[
0
][
'internal_address'
])
{
$remark
.=
',地址改为:'
.
$data
[
'internal_address'
];
$remark
.=
',地址改为:'
.
$data
[
'internal_address'
];
}
$house_ext
=
new
GHousesExt
();
$house_data_ext
=
$house_ext
->
getInfo
(
'landlord_phone'
,
[
'house_id'
=>
$data
[
'id'
]]);
$house_data_ext
=
$this
->
m_house_ext
->
getInfo
(
'landlord_phone'
,
[
'house_id'
=>
$data
[
'id'
]]);
if
(
!
empty
(
$house_data_ext
[
'landlord_phone'
]))
{
$landlord_phone_arr
=
$landlord_phone_new_arr
=
$landlord_phone_old
=
[];
...
...
@@ -119,14 +120,14 @@ class HouseService
}
if
(
!
empty
(
$landlord_phone_old
))
{
$remark
.=
',删除房东手机号:'
.
implode
(
','
,
$landlord_phone_old
);
$remark
.=
',删除房东手机号:'
.
implode
(
','
,
$landlord_phone_old
);
}
}
$m_operating
->
record
(
$agent_id
,
6
,
$remark
,
$data
[
'id'
]);
}
$house_id
=
$this
->
house
->
addHouse
(
$data
,
$agent_id
);
$house_id
=
$this
->
m_
house
->
addHouse
(
$data
,
$agent_id
);
if
(
empty
(
$house_id
))
{
$result
[
'status'
]
=
'fail'
;
...
...
@@ -134,11 +135,10 @@ class HouseService
return
$result
;
}
$houses_ext
=
new
GHousesExt
();
$house_img
=
new
GHousesImgs
();
//商铺扩展字段
$houses
_ext
->
addHouseExt
(
$data
,
$house_id
,
$is_app
);
$this
->
m_house
_ext
->
addHouseExt
(
$data
,
$house_id
,
$is_app
);
//商铺图片
if
(
$is_app
==
1
)
{
...
...
@@ -193,7 +193,7 @@ class HouseService
if
(
!
empty
(
$data
[
'id'
]))
{
//剩余商铺为0下架
if
(
empty
(
$data
[
'residue_num'
])
||
empty
(
$data
[
'total'
]))
{
$this
->
push
->
record
(
1
,
[
0
=>
$house_id
],
0
,
$agent_id
);
//记录推送信息
$this
->
push
->
record
(
1
,
[
0
=>
$house_id
],
0
,
$agent_id
);
//记录推送信息
}
}
...
...
@@ -201,6 +201,10 @@ class HouseService
$result
[
'data'
][
'internal_title'
]
=
$data
[
'internal_title'
];
$result
[
'status'
]
=
'successful'
;
$result
[
'msg'
]
=
'新增或编辑成功!'
;
}
catch
(
\Exception
$e
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
'内部错误:'
.
$e
->
getMessage
();
}
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