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
3d3083c6
Commit
3d3083c6
authored
May 07, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
看铺数量控制
parent
0cc68515
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Shop.php
application/api_broker/controller/Shop.php
+7
-2
LookShopService.php
application/api_broker/service/LookShopService.php
+1
-1
No files found.
application/api_broker/controller/Shop.php
View file @
3d3083c6
...
@@ -10,6 +10,7 @@ use app\model\GHouses;
...
@@ -10,6 +10,7 @@ use app\model\GHouses;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesImgs
;
use
app\model\GHousesImgs
;
use
app\model\Regions
;
use
app\model\Regions
;
use
think\Log
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
@@ -30,6 +31,8 @@ class Shop extends Basic
...
@@ -30,6 +31,8 @@ class Shop extends Basic
$this
->
gHousesModel
=
new
GHouses
();
$this
->
gHousesModel
=
new
GHouses
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
attentionModel
=
new
AttentionModel
();
$this
->
attentionModel
=
new
AttentionModel
();
Log
::
record
(
'info ----shop---------'
.
$this
->
agentId
,
"info"
);
}
}
/**
/**
...
@@ -210,7 +213,9 @@ class Shop extends Basic
...
@@ -210,7 +213,9 @@ class Shop extends Basic
$lookShopService_
=
new
LookShopService
();
$lookShopService_
=
new
LookShopService
();
//todo 判断看铺数量是否上限
//todo 判断看铺数量是否上限
if
(
$lookShopService_
->
isLookShop
(
$this
->
agentId
)
==
0
){
Log
::
record
(
'info ----shopdetail-------'
.
$this
->
agentId
,
"info"
);
if
(
$lookShopService_
->
isLookShop
((
int
)
$this
->
agentId
)
==
0
){
return
$this
->
response
(
"101"
,
"您今天的看铺数量已达上限!"
);
return
$this
->
response
(
"101"
,
"您今天的看铺数量已达上限!"
);
}
}
...
@@ -276,7 +281,7 @@ class Shop extends Basic
...
@@ -276,7 +281,7 @@ class Shop extends Basic
$result
[
"panParty"
]
=
$agentId
;
$result
[
"panParty"
]
=
$agentId
;
//todo 计数开始
//todo 计数开始
if
(
$params
[
"site_area"
]
==
3
&&
$result
){
if
(
$params
[
"site_area"
]
==
3
&&
$result
){
$lookShopArr
=
$lookShopService_
->
countLookShopNum
(
$this
->
agentId
,
$params
[
"id"
]);
$lookShopArr
=
$lookShopService_
->
countLookShopNum
(
(
int
)
$this
->
agentId
,(
int
)
$params
[
"id"
]);
$result
[
"lookShopArr"
]
=
$lookShopArr
;
$result
[
"lookShopArr"
]
=
$lookShopArr
;
}
}
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
...
...
application/api_broker/service/LookShopService.php
View file @
3d3083c6
...
@@ -65,7 +65,7 @@ class LookShopService
...
@@ -65,7 +65,7 @@ class LookShopService
$lookNum
=
5
;
//数据库查询
$lookNum
=
5
;
//数据库查询
$this
->
redis
->
set
(
"lookNum"
,
$lookNum
);
$this
->
redis
->
set
(
"lookNum"
,
$lookNum
);
}
}
if
(
!
$this
->
redis
->
h
Get
(
$this
->
nowTime
,
$agent_id
))
{
//设置每个经纪人的看铺总数
if
(
!
$this
->
redis
->
h
Exists
(
$this
->
nowTime
,
$agent_id
))
{
//设置每个经纪人的看铺总数
$this
->
redis
->
hSet
(
$this
->
nowTime
,
$agent_id
,
0
);
//开始计数
$this
->
redis
->
hSet
(
$this
->
nowTime
,
$agent_id
,
0
);
//开始计数
$this
->
redis
->
hSet
(
self
::
LOOK_TOTAL
.
$this
->
nowTime
,
$agent_id
,
$lookNum
);
//总数
$this
->
redis
->
hSet
(
self
::
LOOK_TOTAL
.
$this
->
nowTime
,
$agent_id
,
$lookNum
);
//总数
}
}
...
...
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