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
882bca9c
Commit
882bca9c
authored
Apr 08, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
1ff7cf56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
11 deletions
+105
-11
OrderLog.php
application/api_broker/controller/OrderLog.php
+5
-5
OrderLogService.php
application/api_broker/service/OrderLogService.php
+100
-6
No files found.
application/api_broker/controller/OrderLog.php
View file @
882bca9c
...
...
@@ -236,12 +236,12 @@ class OrderLog extends Basic
public
function
selectReportAll
()
{
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"order_id"
]))
{
/*
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
}
/*
$params = array(
"order_id" =>
1
,
);
*/
}
*/
$params
=
array
(
"order_id"
=>
53630
,
);
$data
=
$this
->
service_
->
selectListByOrderNo
(
$params
[
"order_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
...
...
application/api_broker/service/OrderLogService.php
View file @
882bca9c
...
...
@@ -10,6 +10,7 @@ use app\model\OPayLogModel;
use
app\model\OrderModel
;
use
app\model\ORefundModel
;
use
app\model\OReportModel
;
use
app\model\Regions
;
/**
...
...
@@ -74,12 +75,12 @@ class OrderLogService
$name
=
$agent_
->
getAgentsById
(
$agent_id
,
'name'
);
$store_data
=
$agent_
->
getStoreAgentId
(
$agent_id
);
//店长
$order_data
=
$order
->
getOrderById
(
'house_title'
,
$order_id
);
$order_data
=
$order
->
getOrderById
(
'house_title'
,
$order_id
);
$content
=
"恭喜【
{
$store_data
[
'store_name'
]
}
】店【
{
$name
}
】成交【
{
$order_data
[
'house_title'
]
}
】商铺一套"
;
$ge_tui
->
public_push_message_for_one
(
$store_data
[
'id'
],
$store_data
[
'device_id'
],
'成交商铺'
,
$content
);
$ge_tui
->
public_push_message_for_one
(
$report_agent_device
[
'id'
],
$report_agent_device
[
'device_id'
],
'成交商铺'
,
$content
);
$ge_tui
->
public_push_message_for_one
(
$store_data
[
'id'
],
$store_data
[
'device_id'
],
'成交商铺'
,
$content
);
$ge_tui
->
public_push_message_for_one
(
$report_agent_device
[
'id'
],
$report_agent_device
[
'device_id'
],
'成交商铺'
,
$content
);
foreach
(
$order_agent_device
as
$v
)
{
$ge_tui
->
public_push_message_for_one
(
$v
[
'id'
],
$v
[
'device_id'
],
'成交商铺'
,
$content
);
$ge_tui
->
public_push_message_for_one
(
$v
[
'id'
],
$v
[
'device_id'
],
'成交商铺'
,
$content
);
}
/*推送 客方,盘方,独家方,店长 end*/
...
...
@@ -229,6 +230,7 @@ class OrderLogService
if
(
count
(
$marchInData
)
>
0
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -236,9 +238,12 @@ class OrderLogService
$field_follow_up
=
"id,user_type,decision_maker,industry_type,area_requirement,price_requirement,province,city,
district,business_area,explain,explain_img,create_time"
;
$followUpLogData
=
$followUpLogModel
->
selectFollowUpListByReportId
(
$field_follow_up
,
[
"report_id"
=>
$report_id
]);
if
(
count
(
$followUpLogData
)
>
0
)
{
foreach
(
$followUpLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"follow_up_log"
;
$v
=
$this
->
convertFollowUp
(
$v
);
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -250,6 +255,7 @@ class OrderLogService
if
(
count
(
$payLogData
)
>
0
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -261,6 +267,7 @@ class OrderLogService
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$result
[
$sort
++
]
=
$v
;
}
}
...
...
@@ -275,9 +282,96 @@ class OrderLogService
$result
[
$sort
++
]
=
$v
;
}
}
return
$this
->
sortByTime
(
$result
);
}
private
function
convertFollowUp
(
$item
)
{
// $field_follow_up = "id,user_type,decision_maker,industry_type,area_requirement,price_requirement,province,city,
// district,business_area,explain,explain_img,create_time";
/* `user_type` tinyint(2) DEFAULT NULL COMMENT '用户类型 1 A类成交意愿较强 2 B类 中等 3 C类较弱 ',
`decision_maker` varchar(80) DEFAULT '' COMMENT '第一决策人',
`industry_type` tinyint(2) DEFAULT NULL COMMENT '租商铺做什么, 1轻餐饮 2重餐饮 3百货零售 4服装 5亲子教育 6休闲娱乐',
`area_requirement` tinyint(2) DEFAULT NULL COMMENT '面积要求 1 30平米内 2 30-60平米 3 60-100平米 4 100平米上',
`price_requirement` tinyint(2) DEFAULT NULL COMMENT '对价格的要求 1.月租金10000元以内 2.月租金10000-30000元 3.月租金30000元以上',
`province` varchar(125) DEFAULT '' COMMENT '省',
`city` varchar(125) DEFAULT '' COMMENT '市',
`district` varchar(125) DEFAULT '' COMMENT '区',
`business_area` varchar(125) DEFAULT '' COMMENT '商圈',
`other_area` varchar(255) DEFAULT '' COMMENT '其他地址',
`explain` varchar(255) DEFAULT '' COMMENT '其他说明',*/
switch
(
$item
[
"user_type"
])
{
case
1
:
$item
[
"user_type"
]
=
"A类(成交意愿较强)"
;
break
;
case
2
:
$item
[
"user_type"
]
=
"B类(成交意愿中等)"
;
break
;
case
3
:
$item
[
"user_type"
]
=
"C类(成交意愿较弱)"
;
break
;
}
switch
(
$item
[
"industry_type"
])
{
case
1
:
$item
[
"industry_type"
]
=
"轻餐饮"
;
break
;
case
2
:
$item
[
"industry_type"
]
=
"重餐饮"
;
break
;
case
3
:
$item
[
"industry_type"
]
=
"百货零售"
;
break
;
case
4
:
$item
[
"industry_type"
]
=
"服装"
;
break
;
case
5
:
$item
[
"industry_type"
]
=
"亲子教育"
;
break
;
case
6
:
$item
[
"industry_type"
]
=
"休闲娱乐"
;
break
;
default
:
$item
[
"industry_type"
]
=
"其他"
;
}
switch
(
$item
[
"area_requirement"
])
{
case
1
:
$item
[
"area_requirement"
]
=
"30平米内"
;
break
;
case
2
:
$item
[
"area_requirement"
]
=
"30-60平米"
;
break
;
case
3
:
$item
[
"area_requirement"
]
=
"60-100平米"
;
break
;
case
4
:
$item
[
"area_requirement"
]
=
"100平米上"
;
break
;
default
:
$item
[
"area_requirement"
]
=
"其他"
;
}
switch
(
$item
[
"price_requirement"
])
{
case
1
:
$item
[
"price_requirement"
]
=
"月租金10000元以内"
;
break
;
case
2
:
$item
[
"price_requirement"
]
=
" 月租金10000-30000元"
;
break
;
case
3
:
$item
[
"price_requirement"
]
=
"月租金30000元以上"
;
break
;
default
:
$item
[
"price_requirement"
]
=
"其他"
;
}
/* $regions = new Regions();
$cityInfo = $regions->getRegions($item["district"],$item["city"],3);
dump($cityInfo);exit;*/
return
$item
;
}
/**
* 排序时间
...
...
@@ -345,7 +439,7 @@ class OrderLogService
$agentArr
=
$vModel
->
getAgentsByAgentId
(
$params
[
"report_agent_id"
]);
if
(
$agentArr
)
{
//$params["report_agent_id"] = $agentArr;
$condition
.=
"and b.report_agent_id in ("
.
trim
(
$agentArr
)
.
") "
;
$condition
.=
"and b.report_agent_id in ("
.
trim
(
$agentArr
)
.
") "
;
}
$caseHouseId
=
$vModel
->
getCaseHouseIdByAgentId
(
$params
[
"report_agent_id"
]);
...
...
@@ -361,7 +455,7 @@ class OrderLogService
$orderModel
=
new
OrderModel
();
$result
=
$orderModel
->
searchOrder
(
$field
,
$condition
,
$where_
);
$result
=
$orderModel
->
searchOrder
(
$field
,
$condition
,
$where_
);
$ids_str
=
""
;
if
(
count
(
$result
)
<=
0
)
{
...
...
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