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
e16655dd
Commit
e16655dd
authored
Apr 20, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
f3abe5c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
12 deletions
+39
-12
OrderLog.php
application/api_broker/controller/OrderLog.php
+18
-5
OrderLogService.php
application/api_broker/service/OrderLogService.php
+21
-7
No files found.
application/api_broker/controller/OrderLog.php
View file @
e16655dd
...
@@ -536,12 +536,24 @@ class OrderLog extends Basic
...
@@ -536,12 +536,24 @@ class OrderLog extends Basic
}
}
}
}
public
function
getListByHouseId
(){
/**
* 商铺动态
* @return \think\Response
*/
public
function
getListByHouseId
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
/* $params = array(
"house_id"
=>
1
"house_id" => 1
);
);*/
if
(
!
isset
(
$params
[
"house_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$data
=
$this
->
service_
->
selectListByHouseId
(
$params
[
"house_id"
]);
$data
=
$this
->
service_
->
selectListByHouseId
(
$params
[
"house_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
if
(
count
(
$data
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
}
}
\ No newline at end of file
application/api_broker/service/OrderLogService.php
View file @
e16655dd
...
@@ -455,7 +455,7 @@ class OrderLogService
...
@@ -455,7 +455,7 @@ class OrderLogService
$oRefundModel
=
new
ORefundModel
();
$oRefundModel
=
new
ORefundModel
();
$oBargainModel
=
new
OBargainModel
();
$oBargainModel
=
new
OBargainModel
();
$field_report
=
"a.id,a.create_time,b.id as order_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$field_report
=
"a.id,a.create_time,
a.user_phone,
b.id as order_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$reportData
=
$oReportModel
->
selectReportByUserId
(
$field_report
,
[
"house_id"
=>
$house_id
]);
$reportData
=
$oReportModel
->
selectReportByUserId
(
$field_report
,
[
"house_id"
=>
$house_id
]);
if
(
count
(
$result
)
<=
0
&&
count
(
$reportData
)
<=
0
)
{
if
(
count
(
$result
)
<=
0
&&
count
(
$reportData
)
<=
0
)
{
...
@@ -466,7 +466,8 @@ class OrderLogService
...
@@ -466,7 +466,8 @@ class OrderLogService
//报备
//报备
foreach
(
$reportData
as
$k
=>
$v
)
{
foreach
(
$reportData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"report"
;
$v
[
"step_name"
]
=
"report"
;
$v
[
"step"
]
=
"报备【"
.
$v
[
'name'
]
.
"- "
.
$v
[
"phone"
]
.
"】"
;
$user_phone
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
$v
[
"step"
]
=
"报备【"
.
$v
[
'name'
]
.
"-"
.
$user_phone
.
"】"
;
$result
[
$sort
++
]
=
$v
;
$result
[
$sort
++
]
=
$v
;
$order_ids
.=
$v
[
"order_id"
]
.
","
;
$order_ids
.=
$v
[
"order_id"
]
.
","
;
...
@@ -485,7 +486,7 @@ class OrderLogService
...
@@ -485,7 +486,7 @@ class OrderLogService
if
(
count
(
$marchInData
)
>
0
)
{
if
(
count
(
$marchInData
)
>
0
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"step"
]
=
"进场
【"
.
$v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"进场
"
.
$this
->
getUserInfoByOrderId
(
$reportData
,
$v
[
"order_id"
])
;
$result
[
$sort
++
]
=
$v
;
$result
[
$sort
++
]
=
$v
;
}
}
}
}
...
@@ -498,7 +499,7 @@ class OrderLogService
...
@@ -498,7 +499,7 @@ class OrderLogService
if
(
count
(
$followUpLogData
)
>
0
)
{
if
(
count
(
$followUpLogData
)
>
0
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"follow_up_log"
;
$v
[
"step_name"
]
=
"follow_up_log"
;
$v
[
"step"
]
=
"跟进"
;
$v
[
"step"
]
=
"报备跟进"
.
$this
->
getUserInfoByOrderId
(
$reportData
,
$v
[
"order_id"
]);
;
$v
=
$this
->
convertFollowUp
(
$v
);
$v
=
$this
->
convertFollowUp
(
$v
);
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$v
[
"explain_img"
]
=
$v
[
"explain_img"
];
$v
[
"explain_img"
]
=
$v
[
"explain_img"
];
...
@@ -512,7 +513,7 @@ class OrderLogService
...
@@ -512,7 +513,7 @@ class OrderLogService
if
(
count
(
$payLogData
)
>
0
)
{
if
(
count
(
$payLogData
)
>
0
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"step"
]
=
"收款【"
.
$v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"收款"
.
$this
->
getUserInfoByOrderId
(
$reportData
,
$v
[
"order_id"
]);
;
$result
[
$sort
++
]
=
$v
;
$result
[
$sort
++
]
=
$v
;
}
}
}
}
...
@@ -525,7 +526,7 @@ class OrderLogService
...
@@ -525,7 +526,7 @@ class OrderLogService
if
(
count
(
$refundData
)
>
0
)
{
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$v
[
"step_name"
]
=
"refund"
;
$v
[
"step"
]
=
"退款【"
.
$v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"退款"
.
$this
->
getUserInfoByOrderId
(
$reportData
,
$v
[
"order_id"
]);
;
$result
[
$sort
++
]
=
$v
;
$result
[
$sort
++
]
=
$v
;
}
}
}
}
...
@@ -536,7 +537,7 @@ class OrderLogService
...
@@ -536,7 +537,7 @@ class OrderLogService
if
(
count
(
$bargainData
)
>
0
)
{
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"step"
]
=
"成交报告【"
.
$v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"成交报告"
.
$this
->
getUserInfoByOrderId
(
$reportData
,
$v
[
"order_id"
]);
;
$result
[
$sort
++
]
=
$v
;
$result
[
$sort
++
]
=
$v
;
}
}
}
}
...
@@ -545,6 +546,19 @@ class OrderLogService
...
@@ -545,6 +546,19 @@ class OrderLogService
return
$this
->
sortByTime
(
$result
);
return
$this
->
sortByTime
(
$result
);
}
}
private
function
getUserInfoByOrderId
(
$report_arr
,
$order_id
)
{
$result
=
""
;
foreach
(
$report_arr
as
$item
)
{
if
(
$item
[
"order_id"
]
==
$order_id
)
{
$user_phone
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$item
[
"user_phone"
]);
$result
=
"【"
.
$item
[
'name'
]
.
"-"
.
$user_phone
.
"】"
;
}
}
return
$result
;
}
private
function
convertFollowUp
(
$item
)
private
function
convertFollowUp
(
$item
)
{
{
switch
(
$item
[
"user_type"
])
{
switch
(
$item
[
"user_type"
])
{
...
...
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