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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
35 deletions
+62
-35
OrderLog.php
application/api_broker/controller/OrderLog.php
+37
-24
OrderLogService.php
application/api_broker/service/OrderLogService.php
+25
-11
No files found.
application/api_broker/controller/OrderLog.php
View file @
e16655dd
...
@@ -160,25 +160,25 @@ class OrderLog extends Basic
...
@@ -160,25 +160,25 @@ class OrderLog extends Basic
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
/* $params = array(
/* $params = array(
"submit_agent_id" => 1,//申请经纪人id
"submit_agent_id" => 1,//申请经纪人id
"submit_agent_name" => 1,//申请经纪人id
"submit_agent_name" => 1,//申请经纪人id
"report_id" => 1,//报备id
"report_id" => 1,//报备id
"order_id" => 1, //关联order表id
"order_id" => 1, //关联order表id
"order_no" => "123123123", //订单no
"order_no" => "123123123", //订单no
"trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费
"trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费
"price" => 112131, //成交价格 存分
"price" => 112131, //成交价格 存分
"commission" => 111, //佣金 存分
"commission" => 111, //佣金 存分
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方',
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方',
//`agent_id`'分佣经纪人id',
//`agent_id`'分佣经纪人id',
//`scale`'分佣比例 如 5表示百分之5',
//`scale`'分佣比例 如 5表示百分之5',
// `scale_fee` '应分佣金 存分 ',
// `scale_fee` '应分佣金 存分 ',
"commission_arr" => '[ { "role" : 10, "agent_id" : 10, "scale" : 10, "scale_fee" : 1222 },
"commission_arr" => '[ { "role" : 10, "agent_id" : 10, "scale" : 10, "scale_fee" : 1222 },
{ "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]',
{ "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]',
);*/
);*/
$params
[
"commission_arr"
]
=
json_decode
(
$params
[
"commission_arr"
],
true
);
$params
[
"commission_arr"
]
=
json_decode
(
$params
[
"commission_arr"
],
true
);
...
@@ -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
;
}
}
}
}
...
@@ -497,8 +498,8 @@ class OrderLogService
...
@@ -497,8 +498,8 @@ 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"
];
...
@@ -511,8 +512,8 @@ class OrderLogService
...
@@ -511,8 +512,8 @@ class OrderLogService
$payLogData
=
$oPayLogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
$payLogData
=
$oPayLogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
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
;
}
}
}
}
...
@@ -524,8 +525,8 @@ class OrderLogService
...
@@ -524,8 +525,8 @@ class OrderLogService
$refundData
=
$oRefundModel
->
getRefundByOrderId
(
$field_refund
,
$orderParams
);
$refundData
=
$oRefundModel
->
getRefundByOrderId
(
$field_refund
,
$orderParams
);
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
;
}
}
}
}
...
@@ -535,8 +536,8 @@ class OrderLogService
...
@@ -535,8 +536,8 @@ class OrderLogService
$bargainData
=
$oBargainModel
->
getBargainByOrderId
(
$field_bargain
,
$orderParams
);
$bargainData
=
$oBargainModel
->
getBargainByOrderId
(
$field_bargain
,
$orderParams
);
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