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
44d864bd
Commit
44d864bd
authored
Jan 11, 2019
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
c49ca904
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
OrderLogService.php
application/api_broker/service/OrderLogService.php
+32
-0
UPhoneFollowUpTemporary.php
application/model/UPhoneFollowUpTemporary.php
+23
-0
No files found.
application/api_broker/service/OrderLogService.php
View file @
44d864bd
...
@@ -18,6 +18,7 @@ use app\model\OReportModel;
...
@@ -18,6 +18,7 @@ use app\model\OReportModel;
use
app\model\OTaxes
;
use
app\model\OTaxes
;
use
app\model\Regions
;
use
app\model\Regions
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\Users
;
use
app\model\Users
;
...
@@ -752,11 +753,27 @@ class OrderLogService
...
@@ -752,11 +753,27 @@ class OrderLogService
$oBargainModel
=
new
OBargainModel
();
$oBargainModel
=
new
OBargainModel
();
$uPhoneFollowModel
=
new
UPhoneFollowUp
(
$site_id
);
$uPhoneFollowModel
=
new
UPhoneFollowUp
(
$site_id
);
$uPhoneFollowTempModel
=
new
UPhoneFollowUpTemporary
(
$site_id
);
//电话跟进
//电话跟进
$userParams
[
"user_id"
]
=
$user_id
;
$userParams
[
"user_id"
]
=
$user_id
;
$userParams
[
"type"
]
=
0
;
//电话跟进
$userParams
[
"type"
]
=
0
;
//电话跟进
$field_user_follow
=
"a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img,c.store_name"
;
$field_user_follow
=
"a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img,c.store_name"
;
$bargainData
=
$uPhoneFollowModel
->
getFollowUpListByUserId
(
$field_user_follow
,
$userParams
);
$bargainData
=
$uPhoneFollowModel
->
getFollowUpListByUserId
(
$field_user_follow
,
$userParams
);
$bargainDataTemp
=
$uPhoneFollowTempModel
->
getFollowUpListByUserId
(
$field_user_follow
,
$userParams
);
if
(
count
(
$bargainDataTemp
)
>
0
)
{
foreach
(
$bargainDataTemp
as
$k
=>
$v
)
{
$type
=
"无效"
;
if
(
$v
[
"user_status"
]
==
0
)
{
$type
=
"求租"
;
}
elseif
(
$v
[
"user_status"
]
==
1
)
{
$type
=
"已租"
;
}
$v
[
"step_name"
]
=
"phone_follow_up"
;
$v
[
"step"
]
=
"电话跟进:"
.
$v
[
'content'
]
.
"【"
.
$type
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
if
(
count
(
$bargainData
)
>
0
)
{
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$type
=
"无效"
;
$type
=
"无效"
;
...
@@ -774,6 +791,21 @@ class OrderLogService
...
@@ -774,6 +791,21 @@ class OrderLogService
//跟进
//跟进
$userParams
[
"type"
]
=
1
;
//普通跟进
$userParams
[
"type"
]
=
1
;
//普通跟进
$bargainData
=
$uPhoneFollowModel
->
getFollowUpListByUserId
(
$field_user_follow
,
$userParams
);
$bargainData
=
$uPhoneFollowModel
->
getFollowUpListByUserId
(
$field_user_follow
,
$userParams
);
$bargainDataTemp
=
$uPhoneFollowTempModel
->
getFollowUpListByUserId
(
$field_user_follow
,
$userParams
);
if
(
count
(
$bargainDataTemp
)
>
0
)
{
foreach
(
$bargainDataTemp
as
$k
=>
$v
)
{
$type
=
"无效"
;
if
(
$v
[
"user_status"
]
==
0
)
{
$type
=
"求租"
;
}
elseif
(
$v
[
"user_status"
]
==
1
)
{
$type
=
"已租"
;
}
$v
[
"step_name"
]
=
"follow_up"
;
$v
[
"step"
]
=
"跟进:"
.
$v
[
'content'
]
.
"【"
.
$type
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
if
(
count
(
$bargainData
)
>
0
)
{
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$type
=
"无效"
;
$type
=
"无效"
;
...
...
application/model/UPhoneFollowUpTemporary.php
View file @
44d864bd
...
@@ -133,6 +133,29 @@ class UPhoneFollowUpTemporary extends BaseModel
...
@@ -133,6 +133,29 @@ class UPhoneFollowUpTemporary extends BaseModel
return
$result
;
return
$result
;
}
public
function
getFollowUpListByUserId
(
$field
,
$params
)
{
if
(
!
$this
->
createTable
()){
return
null
;
}
$where_
=
[];
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
}
if
(
isset
(
$params
[
"type"
]))
{
$where_
[
"a.type"
]
=
$params
[
"type"
];
}
$result
=
$this
->
follow_up
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
join
(
"a_store c"
,
"b.store_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
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