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
6d0eda3c
Commit
6d0eda3c
authored
Mar 29, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into test-hujun1.15
# Conflicts: # application/api/controller/Member.php # application/model/Users.php
parents
68c90527
d8095bf0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
16 deletions
+40
-16
Member.php
application/api/controller/Member.php
+8
-0
Broker.php
application/api_broker/controller/Broker.php
+10
-5
Client.php
application/api_broker/controller/Client.php
+14
-10
Label.php
application/index/controller/Label.php
+1
-1
Users.php
application/model/Users.php
+7
-0
No files found.
application/api/controller/Member.php
View file @
6d0eda3c
...
...
@@ -232,11 +232,19 @@ class Member extends Basic
if
(
!
empty
(
$user_data
->
id
)
&&
(
$user_data
->
status
!=
-
1
))
{
return
$this
->
response
(
101
,
'该手机号已注册'
);
}
<<<<<<<
HEAD
if
(
$this
->
request
->
param
(
'code'
)
==
$code
&&
$code
!=
''
)
{
$referrer_source
=
$this
->
request
->
param
(
'referrer_source'
);
$referrer_id
=
$this
->
request
->
param
(
'referrer_id'
);
=======
if
(
$this
->
request
->
param
(
'code'
)
==
$code
&&
$code
!=
''
)
{
$referrer_source
=
$this
->
request
->
param
(
'referrer_source'
);
$referrer_id
=
$this
->
request
->
param
(
'referrer_id'
);
>>>>>>>
test
if
(
!
isset
(
$user_data
->
status
)
&&
(
$user_data
->
status
!=
-
1
))
{
if
(
$referrer_source
==
20
)
{
//经纪人id 计算佣金的字段
...
...
application/api_broker/controller/Broker.php
View file @
6d0eda3c
...
...
@@ -140,16 +140,21 @@ class Broker extends Basic
$labels_id
=
$params
[
'labels_id'
];
$user_id
=
$params
[
'user_id'
];
$agent_id
=
$params
[
'agent_id'
];
$type
=
$params
[
'type'
];
$user_status
=
$params
[
'user_status'
];
$type
=
$params
[
'type'
];
//0电话跟进 1普通跟进
//主表查询商铺详细信息
$UPhoneFollowPp
=
new
UPhoneFollowPp
();
$UPhoneFollowPp
->
content
=
$content
;
$UPhoneFollowPp
->
content
=
$content
;
$UPhoneFollowPp
->
labels_id
=
$labels_id
;
$UPhoneFollowPp
->
user_id
=
$user_id
;
$UPhoneFollowPp
->
agent_id
=
$agent_id
;
$UPhoneFollowPp
->
type
=
$type
;
$UPhoneFollowPp
->
user_id
=
$user_id
;
$UPhoneFollowPp
->
agent_id
=
$agent_id
;
$UPhoneFollowPp
->
type
=
$type
;
$UPhoneFollowPp
->
user_status
=
$user_status
;
$UPhoneFollowPp
->
save
();
//dump($UPhoneFollowPp->id);exit;
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users
=
new
Users
();
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
if
(
$UPhoneFollowPp
->
id
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$UPhoneFollowPp
->
id
);
...
...
application/api_broker/controller/Client.php
View file @
6d0eda3c
...
...
@@ -140,7 +140,7 @@ class Client extends Basic
//搜索客户--可以搜索自己的客户and 不在保护期的客户
// $where = " (agent_id in(0,{$params['agent_id']}) or agent_id is null or TIMESTAMPDIFF(MINUTE,create_time,'{$time}') > 2880 )
// and ( user_nick like '%{$params['search']}%' or user_phone like '%{$params['search']}%' ) ";
$where
=
"
(agent_id in(0,
{
$params
[
'agent_id'
]
}
) or agent_id is null or TIMESTAMPDIFF(MINUTE,create_time,'
{
$time
}
') > 0
)
$where
=
"
agent_id in(
{
$params
[
'agent_id'
]
}
)
and ( user_nick like '%
{
$params
[
'search'
]
}
%' or user_phone like '%
{
$params
[
'search'
]
}
%' ) "
;
$data
[
'search'
]
=
$params
[
'search'
];
}
...
...
@@ -251,22 +251,26 @@ class Client extends Basic
if
(
$search_type
==
'0'
)
{
//客户电话
$conditions
[
'user_phone'
]
=
[
'LIKE'
,
"%
$phone_or_name
%"
];
}
elseif
(
$search_type
==
'1'
){
//客户
电话
$conditions
[
'user_nick'
]
=
[
'LIKE'
,
"%
$phone_or_name
%"
];
$conditions
[
'user_phone'
]
=
[
'LIKE'
,
$phone_or_name
.
'%'
];
}
elseif
(
$search_type
==
'1'
){
//客户
$conditions
[
'user_nick'
]
=
[
'LIKE'
,
$phone_or_name
.
'%'
];
}
if
(
$search_type
!=
'2'
)
{
//全部客户
if
(
$search_type
==
''
){
if
(
$type
==
'0'
)
{
//求租:0 ;已租:1 数据库0:求租;1:已租;-1:无效
$conditions
[
'user_status'
]
=
0
;
}
else
{
//
$conditions
[
'user_status'
]
=
1
;
}
}
$user
=
new
Users
();
$user_res
=
$user
->
all_user
(
$conditions
,
$pagesize
,
$pagenum
);
$total
=
$user
->
all_user_count
(
$conditions
);
//dump($conditions);//exit;
}
else
{
//跟进
$UPhoneFollowPp
=
new
UPhoneFollowPp
();
$user_res
=
$UPhoneFollowPp
->
all_user_search
(
$phone_or_name
,
$pagesize
,
$pagenum
);
...
...
@@ -286,16 +290,16 @@ class Client extends Basic
{
$label
[]
=
'我的'
;
}
/*dump($v['create_time']);
$time=strtotime(date("Y-m-d h:i:s"))-strtotime($v['create_time']);
dump(strtotime(date("Y-m-d h:i:s"))-strtotime($v['create_time']));//48时(h)=172800秒(s)
exit;*/
if
((
strtotime
(
date
(
"Y-m-d h:i:s"
))
-
strtotime
(
$v
[
'create_time'
]))
<
172800
)
/*if((strtotime(date("Y-m-d h:i:s")) - strtotime($v['create_time'])) < 172800)
{
$label[] = '保护期内';
}
}*/
//无效客户不显示标签
if
(
$v
[
'user_status'
]
!=
-
1
){
$user_res
[
$k
][
'label'
]
=
implode
(
','
,
$label
);
}
}
}
else
{
//跟进数据处理
foreach
(
$user_res
as
$k
=>
$v
)
{
...
...
application/index/controller/Label.php
View file @
6d0eda3c
...
...
@@ -150,7 +150,7 @@ class Label extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$labels
=
New
ULabels
;
$field
=
'id,name,create_time'
;
$field
=
'id,name,create_time
,free
'
;
$where
[
'type'
]
=
1
;
$result
[
'data'
][
'list'
]
=
$labels
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$result
[
'data'
][
'total'
]
=
$labels
->
getTotal
(
$where
);
...
...
application/model/Users.php
View file @
6d0eda3c
...
...
@@ -347,4 +347,11 @@ class Users extends Model
->
where
(
$params
)
->
count
();
}
/**
* 普通跟进,对客户状态进行更新
*/
public
function
update_user_status
(
$conditions
=
''
)
{
return
db
(
'u_users'
)
->
update
(
$conditions
);
}
}
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