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
009952b5
Commit
009952b5
authored
Aug 28, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
9f61329b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
Broker.php
application/api_broker/controller/Broker.php
+4
-1
LookShop.php
application/api_broker/controller/LookShop.php
+2
-4
LookShopService.php
application/api_broker/service/LookShopService.php
+7
-3
No files found.
application/api_broker/controller/Broker.php
View file @
009952b5
...
...
@@ -25,6 +25,7 @@ use app\model\NoteLog;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
use
think\Exception
;
use
think\Log
;
use
think\Request
;
class
Broker
extends
Basic
...
...
@@ -422,6 +423,8 @@ class Broker extends Basic
$user
=
new
Users
();
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
,
1
);
Log
::
write
(
json_encode
(
$user_res
),
'客户详情'
);
//记录日志
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
...
...
@@ -462,7 +465,7 @@ class Broker extends Basic
//$res = $ser->getExpiredTimeByUser($v["user_id"]);
//$data['data']['list'][$k]['is_outstrip_twenty_four_hours'] = $res ? 0 : 1 ;
$is_outstrip_twenty_four_hours
=
0
;
if
((
time
()
-
strtotime
(
$user_res
[
'
u_
create_time'
]))
>
(
60
*
60
*
24
))
{
if
((
time
()
-
strtotime
(
$user_res
[
'create_time'
]))
>
(
60
*
60
*
24
))
{
$is_outstrip_twenty_four_hours
=
1
;
}
$data
[
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
...
...
application/api_broker/controller/LookShop.php
View file @
009952b5
...
...
@@ -142,14 +142,12 @@ class LookShop extends Basic
$lookNum
=
$data
[
"agent_shop_num"
];
}
//todo 1.返回剩余铺数等于多少 if 0 判断是否升级过 ,升级过 显示已升级,没升级过 升级可以点击效果 else 不等于0 灰色的升级
//1.返回剩余铺数等于多少 if 0 判断是否升级过 ,升级过 显示已升级,没升级过 升级可以点击效果 else 不等于0 灰色的升级
foreach
(
$agentList
as
$key
=>
$item
)
{
Log
::
write
(
$item
[
"id"
],
'看铺经纪人ID'
);
//记录日志
$can_look_num
=
$this
->
lookShopService_
->
isLookShop
(
$item
[
"id"
]);
$is_upgrade
=
$this
->
lookShopService_
->
getAgentUpNum
(
$item
[
"id"
]);
$agentList
[
$key
][
"can_look_num"
]
=
$can_look_num
;
$agentList
[
$key
][
"is_upgrade"
]
=
$is_upgrade
;
//等于1 升级过 0 没有
$agentList
[
$key
][
"is_upgrade"
]
=
$is_upgrade
==
1
?
false
:
true
;
//前端判断 等于1是未升级 2已升级
}
$result
[
"look_num"
]
=
$lookNum
;
$result
[
"list"
]
=
$agentList
;
...
...
application/api_broker/service/LookShopService.php
View file @
009952b5
...
...
@@ -183,7 +183,7 @@ class LookShopService
return
false
;
}
$agentUpNum
=
$this
->
redis
->
hGet
(
self
::
LOOK_UP_NUM
.
$this
->
nowTime
,
$agent_id
);
if
(
$agentUpNum
>=
1
){
if
(
$agentUpNum
>=
2
){
return
false
;
}
$upLookNum
=
(
int
)
$agentUpNum
+
1
;
...
...
@@ -191,11 +191,15 @@ class LookShopService
return
true
;
}
public
function
getAgentUpNum
(
int
$agent_id
)
:
bool
/**
* 查询经纪人升级次数
* @param int $agent_id
* @return int
*/
public
function
getAgentUpNum
(
int
$agent_id
)
:
int
{
$agentUpNum
=
$this
->
redis
->
hGet
(
self
::
LOOK_UP_NUM
.
$this
->
nowTime
,
$agent_id
);
return
$agentUpNum
;
}
...
...
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