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
21edf981
Commit
21edf981
authored
May 08, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
看铺数量控制 盘方控制
parent
15be56a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
28 deletions
+32
-28
Shop.php
application/api_broker/controller/Shop.php
+32
-27
Basic.php
application/api_broker/extend/Basic.php
+0
-1
No files found.
application/api_broker/controller/Shop.php
View file @
21edf981
...
@@ -24,13 +24,15 @@ class Shop extends Basic
...
@@ -24,13 +24,15 @@ class Shop extends Basic
private
$gHousesModel
;
private
$gHousesModel
;
private
$gHousesImgModel
;
private
$gHousesImgModel
;
private
$attentionModel
;
private
$attentionModel
;
private
$lookShopService_
;
function
__construct
(
$request
=
null
)
function
__construct
(
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
$this
->
gHousesModel
=
new
GHouses
();
$this
->
gHousesModel
=
new
GHouses
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
attentionModel
=
new
AttentionModel
();
$this
->
attentionModel
=
new
AttentionModel
();
$this
->
lookShopService_
=
new
LookShopService
();
}
}
/**
/**
...
@@ -173,6 +175,10 @@ class Shop extends Basic
...
@@ -173,6 +175,10 @@ class Shop extends Basic
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
$param
[
"img_type"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
$result
[
$key
][
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
if
(
$params
[
"site_area"
]
==
3
)
{
$isLook
=
$this
->
lookShopService_
->
isLooked
(
$this
->
agentId
,
$val
[
"id"
]);
$result
[
$key
][
"is_look"
]
=
$isLook
;
}
}
}
...
@@ -210,7 +216,6 @@ class Shop extends Basic
...
@@ -210,7 +216,6 @@ class Shop extends Basic
}
}
if
(
$params
[
'site_area'
]
==
1
)
{
if
(
$params
[
'site_area'
]
==
1
)
{
$field
=
"a.id,a.external_title as title,a.external_address as address,a.city,a.disc,a.business_district_id,a.status,
$field
=
"a.id,a.external_title as title,a.external_address as address,a.city,a.disc,a.business_district_id,a.status,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
...
@@ -231,7 +236,7 @@ class Shop extends Basic
...
@@ -231,7 +236,7 @@ class Shop extends Basic
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
if
(
count
(
$result
)
<=
0
)
{
if
(
count
(
$result
)
<=
0
)
{
return
$this
->
response
(
"101"
,
'此楼盘不存在'
);
return
$this
->
response
(
"101"
,
'此楼盘不存在'
);
}
}
...
@@ -272,13 +277,12 @@ class Shop extends Basic
...
@@ -272,13 +277,12 @@ class Shop extends Basic
$agentId
=
$verify
->
getPanpartyAgentsByHouseId
(
$params
[
"id"
]);
$agentId
=
$verify
->
getPanpartyAgentsByHouseId
(
$params
[
"id"
]);
$result
[
"panParty"
]
=
$agentId
;
$result
[
"panParty"
]
=
$agentId
;
$lookShopService_
=
new
LookShopService
();
// 计数开始
// 计数开始
if
(
$params
[
"site_area"
]
==
3
&&
$result
)
{
if
(
$params
[
"site_area"
]
==
3
&&
$result
)
{
$lookShopArr
=
$
lookShopService_
->
countLookShopNum
((
int
)
$this
->
agentId
,
(
int
)
$params
[
"id"
]);
$lookShopArr
=
$
this
->
lookShopService_
->
countLookShopNum
((
int
)
$this
->
agentId
,
(
int
)
$params
[
"id"
]);
//判断看铺数量是否上限
//判断看铺数量是否上限
if
(
$lookShopArr
[
"residue_num"
]
==
0
&&
!
$lookShopArr
[
"isExist"
]
&&
!
$lookShopArr
[
"isPanParty"
]
)
{
if
(
$lookShopArr
[
"residue_num"
]
==
0
&&
!
$lookShopArr
[
"isExist"
]
&&
!
$lookShopArr
[
"isPanParty"
])
{
return
$this
->
response
(
"102"
,
"您今天的看铺数量已达上限!"
);
return
$this
->
response
(
"102"
,
"您今天的看铺数量已达上限!"
);
}
}
$result
[
"lookShopArr"
]
=
$lookShopArr
;
$result
[
"lookShopArr"
]
=
$lookShopArr
;
...
@@ -382,8 +386,8 @@ class Shop extends Basic
...
@@ -382,8 +386,8 @@ class Shop extends Basic
$img
=
new
GHousesImgs
();
$img
=
new
GHousesImgs
();
$id
=
$img
->
getHouseImagesInfo
(
'id'
,
[
$id
=
$img
->
getHouseImagesInfo
(
'id'
,
[
'house_id'
=>
$this
->
params
[
'house_id'
],
'house_id'
=>
$this
->
params
[
'house_id'
],
'img_name'
=>
$this
->
params
[
'save_path'
],
'img_name'
=>
$this
->
params
[
'save_path'
],
'img_status'
=>
0
'img_status'
=>
0
]);
]);
...
@@ -435,26 +439,27 @@ class Shop extends Basic
...
@@ -435,26 +439,27 @@ class Shop extends Basic
* 新增店铺跟进
* 新增店铺跟进
* @return \think\Response
* @return \think\Response
*/
*/
public
function
addShopFollowUp
(){
public
function
addShopFollowUp
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"house_id" => 1,
"house_id" => 1,
"follow_up_info"=>"123123131",
"follow_up_info"=>"123123131",
"agent_id"=>1,
"agent_id"=>1,
"agent_name"=>"2324",
"agent_name"=>"2324",
"agent_phone"=>"13766166616",
"agent_phone"=>"13766166616",
);*/
);*/
if
(
!
isset
(
$params
[
"house_id"
])
||
!
isset
(
$params
[
"follow_up_info"
])
||
!
isset
(
$params
[
"agent_id"
])
if
(
!
isset
(
$params
[
"house_id"
])
||
!
isset
(
$params
[
"follow_up_info"
])
||
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"agent_name"
])
||
!
isset
(
$params
[
"agent_phone"
]))
{
||
!
isset
(
$params
[
"agent_name"
])
||
!
isset
(
$params
[
"agent_phone"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$follow_up_model
=
new
GHousesFollowUp
();
$follow_up_model
=
new
GHousesFollowUp
();
$id
=
$follow_up_model
->
addHousesFollowUp
(
$params
);
$id
=
$follow_up_model
->
addHousesFollowUp
(
$params
);
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,[
"id"
=>
$id
]);
return
$this
->
response
(
"200"
,
"request success"
,
[
"id"
=>
$id
]);
}
else
{
}
else
{
return
$this
->
response
(
"200"
,
"request error"
);
return
$this
->
response
(
"200"
,
"request error"
);
}
}
...
...
application/api_broker/extend/Basic.php
View file @
21edf981
...
@@ -40,7 +40,6 @@ class Basic extends Controller
...
@@ -40,7 +40,6 @@ class Basic extends Controller
protected
$filterVerify
=
array
(
protected
$filterVerify
=
array
(
'broker/login'
,
'broker/login'
,
'broker/token'
,
'broker/token'
,
'broker/getShopList'
,
'broker/getRegions'
,
'broker/getRegions'
,
'broker/getAddress'
,
'broker/getAddress'
,
'broker/getBroker'
,
'broker/getBroker'
,
...
...
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