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
3b164f29
Commit
3b164f29
authored
Apr 23, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
店铺动态
parent
539141ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
38 deletions
+60
-38
OrderLog.php
application/api_broker/controller/OrderLog.php
+36
-27
OrderLogService.php
application/api_broker/service/OrderLogService.php
+23
-11
FollowUpLogModel.php
application/model/FollowUpLogModel.php
+1
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
3b164f29
...
...
@@ -160,25 +160,25 @@ class OrderLog extends Basic
!
isset
(
$params
[
"price"
])
||
!
isset
(
$params
[
"commission"
])
||
!
isset
(
$params
[
"commission_arr"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
/* $params = array(
"submit_agent_id" => 1,//申请经纪人id
"submit_agent_name" => 1,//申请经纪人id
"report_id" => 1,//报备id
"order_id" => 1, //关联order表id
"order_no" => "123123123", //订单no
"trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费
"price" => 112131, //成交价格 存分
"commission" => 111, //佣金 存分
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方',
//`agent_id`'分佣经纪人id',
//`scale`'分佣比例 如 5表示百分之5',
// `scale_fee` '应分佣金 存分 ',
"commission_arr" => '[ { "role" : 10, "agent_id" : 10, "scale" : 10, "scale_fee" : 1222 },
{ "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]',
);*/
/* $params = array(
"submit_agent_id" => 1,//申请经纪人id
"submit_agent_name" => 1,//申请经纪人id
"report_id" => 1,//报备id
"order_id" => 1, //关联order表id
"order_no" => "123123123", //订单no
"trade_type" => 10, //成交类型 10出租 20 增佣 30 代理 40 好处费
"price" => 112131, //成交价格 存分
"commission" => 111, //佣金 存分
//`role` '分佣方 1盘方 2客方 3 反签 4独家 5合作方',
//`agent_id`'分佣经纪人id',
//`scale`'分佣比例 如 5表示百分之5',
// `scale_fee` '应分佣金 存分 ',
"commission_arr" => '[ { "role" : 10, "agent_id" : 10, "scale" : 10, "scale_fee" : 1222 },
{ "role": 11, "agent_id" : 12, "scale": 13, "scale_fee" : 1112 }]',
);*/
$params
[
"commission_arr"
]
=
json_decode
(
$params
[
"commission_arr"
],
true
);
...
...
@@ -536,18 +536,26 @@ class OrderLog extends Basic
}
}
/**
* 店铺动态
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getListByHouseId
(){
public
function
getListByHouseId
()
{
$params
=
$this
->
params
;
/* $params = array(
"house_id"=>1
);*/
$params
=
array
(
"house_id"
=>
1
);
if
(
!
isset
(
$params
[
"house_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$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 @
3b164f29
...
...
@@ -440,7 +440,10 @@ class OrderLogService
/**
* 查询流程 商铺动态
* @param $house_id
* @return array
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectListByHouseId
(
$house_id
)
{
...
...
@@ -463,19 +466,27 @@ class OrderLogService
}
$order_ids
=
$report_ids
=
""
;
$user_info_arr
=
[];
//报备
foreach
(
$reportData
as
$k
=>
$v
)
{
$v
[
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
$v
[
"step_name"
]
=
"report"
;
$v
[
"step"
]
=
"报备【"
.
$v
[
'user_name'
]
.
"-
"
.
$v
[
"user_phone"
]
.
"】"
;
$v
[
"step"
]
=
"报备【"
.
$v
[
'user_name'
]
.
"-"
.
$v
[
"user_phone"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
$order_ids
.=
$v
[
"order_id"
]
.
","
;
$report_ids
.=
$v
[
"id"
]
.
","
;
//todo 组装成order_id为key的数组
$user_info_arr
[
$v
[
"order_id"
]]
=
$v
;
}
$order_ids
=
rtrim
(
$order_ids
,
","
);
$report_ids
=
rtrim
(
$report_ids
,
","
);
$orderParams
[
"order_id"
]
=
array
(
"in"
,
$order_ids
);
$reportParams
[
"report_id"
]
=
array
(
"in"
,
$report_ids
);
...
...
@@ -485,23 +496,24 @@ class OrderLogService
if
(
count
(
$marchInData
)
>
0
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"step"
]
=
"进场【"
.
$
v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"进场【"
.
$
user_info_arr
[
$v
[
'order_id'
]][
'user_name'
]
.
"-"
.
$user_info_arr
[
$v
[
'order_id'
]][
"user_phone"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
//跟进
$field_follow_up
=
"a.id,a.agent_id,a.agent_name,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city,
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name"
;
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name
,d.user_name,d.user_phone
"
;
$followUpLogData
=
$followUpLogModel
->
getFollowUpByOrderId
(
$field_follow_up
,
$reportParams
);
if
(
count
(
$followUpLogData
)
>
0
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"follow_up_log"
;
$v
[
"step"
]
=
"跟进"
;
$v
[
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
$v
[
"step"
]
=
"跟进【"
.
$v
[
'user_name'
]
.
"-"
.
$v
[
'user_phone'
]
.
"】"
;
$v
=
$this
->
convertFollowUp
(
$v
);
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$v
[
"explain_img"
]
=
$v
[
"explain_img"
];
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -512,7 +524,7 @@ class OrderLogService
if
(
count
(
$payLogData
)
>
0
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"step"
]
=
"收款【"
.
$
v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"收款【"
.
$
user_info_arr
[
$v
[
'order_id'
]][
'user_name'
]
.
"-"
.
$user_info_arr
[
$v
[
'order_id'
]][
"user_phone"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -525,7 +537,7 @@ class OrderLogService
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$v
[
"step"
]
=
"退款【"
.
$
v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"退款【"
.
$
user_info_arr
[
$v
[
'order_id'
]][
'user_name'
]
.
"-"
.
$user_info_arr
[
$v
[
'order_id'
]][
"user_phone"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -536,7 +548,7 @@ class OrderLogService
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"step"
]
=
"成交报告【"
.
$
v
[
'house_title'
]
.
"】"
;
$v
[
"step"
]
=
"成交报告【"
.
$
user_info_arr
[
$v
[
'order_id'
]][
'user_name'
]
.
"-"
.
$user_info_arr
[
$v
[
'order_id'
]][
"user_phone"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
application/model/FollowUpLogModel.php
View file @
3b164f29
...
...
@@ -107,6 +107,7 @@ class FollowUpLogModel extends Model
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
join
(
"a_store c"
,
"b.store_id = c.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
...
...
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