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
f3abe5c3
Commit
f3abe5c3
authored
Apr 20, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis服务
parent
0f421b77
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
196 additions
and
1 deletion
+196
-1
RedisController.php
application/api/controller/RedisController.php
+24
-0
OrderLog.php
application/api_broker/controller/OrderLog.php
+10
-0
OrderLogService.php
application/api_broker/service/OrderLogService.php
+110
-1
RedisExt.php
application/extra/RedisExt.php
+43
-0
OReportModel.php
application/model/OReportModel.php
+3
-0
route.php
application/route.php
+6
-0
No files found.
application/api/controller/RedisController.php
0 → 100644
View file @
f3abe5c3
<?php
namespace
app\api\controller
;
use
app\extra\RedisExt
;
use
think\cache\driver\Redis
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/4/20
* Time : 11:01
* Intro:
*/
class
RedisController
{
public
function
index
()
{
$Redis
=
RedisExt
::
getRedis
();
$Redis
->
set
(
"test"
,
"test"
);
echo
$Redis
->
get
(
"test"
);
}
}
\ No newline at end of file
application/api_broker/controller/OrderLog.php
View file @
f3abe5c3
...
@@ -535,4 +535,13 @@ class OrderLog extends Basic
...
@@ -535,4 +535,13 @@ class OrderLog extends Basic
return
$this
->
response
(
"200"
,
"request null"
);
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
}
public
function
getListByHouseId
(){
$params
=
$this
->
params
;
$params
=
array
(
"house_id"
=>
1
);
$data
=
$this
->
service_
->
selectListByHouseId
(
$params
[
"house_id"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
}
}
\ No newline at end of file
application/api_broker/service/OrderLogService.php
View file @
f3abe5c3
...
@@ -128,7 +128,7 @@ class OrderLogService
...
@@ -128,7 +128,7 @@ class OrderLogService
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
));
$order_id
,
$order_no
,
$trade_type
,
$price
,
$commission
));
}
}
}
}
array_push
(
$agent_arr
,
[
$commission_val
[
"agent_id"
]
]);
array_push
(
$agent_arr
,
[
$commission_val
[
"agent_id"
]
]);
}
}
if
(
$father_id
>
0
)
{
//修改楼盘
if
(
$father_id
>
0
)
{
//修改楼盘
$houseNumUpdateService
=
new
HouseNumUpdateService
();
$houseNumUpdateService
=
new
HouseNumUpdateService
();
...
@@ -436,6 +436,115 @@ class OrderLogService
...
@@ -436,6 +436,115 @@ class OrderLogService
return
$this
->
sortByTime
(
$result
);
return
$this
->
sortByTime
(
$result
);
}
}
/**
* 查询流程 商铺动态
* @param $house_id
* @return array
*/
public
function
selectListByHouseId
(
$house_id
)
{
$result
=
[];
$sort
=
0
;
//todo 1.验证订单是否存在
$oReportModel
=
new
OReportModel
();
$oMarchInModel
=
new
OMarchInModel
();
$followUpLogModel
=
new
FollowUpLogModel
();
$oPayLogModel
=
new
OPayLogModel
();
$oRefundModel
=
new
ORefundModel
();
$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"
;
$reportData
=
$oReportModel
->
selectReportByUserId
(
$field_report
,
[
"house_id"
=>
$house_id
]);
if
(
count
(
$result
)
<=
0
&&
count
(
$reportData
)
<=
0
)
{
return
[];
}
$order_ids
=
$report_ids
=
""
;
//报备
foreach
(
$reportData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"report"
;
$v
[
"step"
]
=
"报备【"
.
$v
[
'name'
]
.
"- "
.
$v
[
"phone"
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
$order_ids
.=
$v
[
"order_id"
]
.
","
;
$report_ids
.=
$v
[
"id"
]
.
","
;
}
$order_ids
=
rtrim
(
$order_ids
,
","
);
$report_ids
=
rtrim
(
$report_ids
,
","
);
$orderParams
[
"order_id"
]
=
array
(
"in"
,
$order_ids
);
$reportParams
[
"report_id"
]
=
array
(
"in"
,
$report_ids
);
//进场 march in
$field_march_in
=
"a.id,a.reception_id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$marchInData
=
$oMarchInModel
->
getMarchInListByOrderId
(
$field_march_in
,
$orderParams
);
if
(
count
(
$marchInData
)
>
0
)
{
foreach
(
$marchInData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"march_in"
;
$v
[
"step"
]
=
"进场【"
.
$v
[
'house_title'
]
.
"】"
;
$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"
;
$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
=
$this
->
convertFollowUp
(
$v
);
$v
[
"img_path"
]
=
CHAT_IMG_URL
;
$v
[
"explain_img"
]
=
$v
[
"explain_img"
];
$result
[
$sort
++
]
=
$v
;
}
}
//收款
$field_pay_log
=
"a.id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$payLogData
=
$oPayLogModel
->
getPayLogByOrderId
(
$field_pay_log
,
$orderParams
);
if
(
count
(
$payLogData
)
>
0
)
{
foreach
(
$payLogData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"pay_log"
;
$v
[
"step"
]
=
"收款【"
.
$v
[
'house_title'
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
//退款
$field_refund
=
"a.id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$refundData
=
$oRefundModel
->
getRefundByOrderId
(
$field_refund
,
$orderParams
);
if
(
count
(
$refundData
)
>
0
)
{
foreach
(
$refundData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"refund"
;
$v
[
"step"
]
=
"退款【"
.
$v
[
'house_title'
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
//成交报告
$field_bargain
=
"a.id,a.create_time,b.id as order_id,b.house_id,b.house_title,c.id as agent_id,c.name,c.img,d.store_name"
;
$bargainData
=
$oBargainModel
->
getBargainByOrderId
(
$field_bargain
,
$orderParams
);
if
(
count
(
$bargainData
)
>
0
)
{
foreach
(
$bargainData
as
$k
=>
$v
)
{
$v
[
"step_name"
]
=
"bargain"
;
$v
[
"step"
]
=
"成交报告【"
.
$v
[
'house_title'
]
.
"】"
;
$result
[
$sort
++
]
=
$v
;
}
}
return
$this
->
sortByTime
(
$result
);
}
private
function
convertFollowUp
(
$item
)
private
function
convertFollowUp
(
$item
)
{
{
switch
(
$item
[
"user_type"
])
{
switch
(
$item
[
"user_type"
])
{
...
...
application/extra/RedisExt.php
0 → 100644
View file @
f3abe5c3
<?php
namespace
app\extra
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/4/20
* Time : 13:49
* Intro:
*/
use
think\cache\driver\Redis
;
class
RedisExt
{
private
static
$_instance
=
null
;
//静态实例
private
function
__construct
()
{
$config
=
[
'host'
=>
'127.0.0.1'
,
'port'
=>
6379
,
'password'
=>
''
,
'select'
=>
0
,
'timeout'
=>
0
,
'expire'
=>
0
,
'persistent'
=>
false
,
'prefix'
=>
''
,
];
self
::
$_instance
=
new
Redis
(
$config
);
}
public
static
function
getRedis
()
{
if
(
!
self
::
$_instance
)
{
new
self
;
}
return
self
::
$_instance
;
}
}
\ No newline at end of file
application/model/OReportModel.php
View file @
f3abe5c3
...
@@ -106,6 +106,9 @@ class OReportModel extends Model
...
@@ -106,6 +106,9 @@ class OReportModel extends Model
if
(
isset
(
$params
[
"user_id"
]))
{
if
(
isset
(
$params
[
"user_id"
]))
{
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
}
}
if
(
isset
(
$params
[
"house_id"
]))
{
$where_
[
"b.house_id"
]
=
$params
[
"house_id"
];
}
$where_
[
"a.status"
]
=
0
;
$where_
[
"a.status"
]
=
0
;
return
$this
->
db
return
$this
->
db
...
...
application/route.php
View file @
f3abe5c3
...
@@ -52,6 +52,11 @@ Route::group('index', [
...
@@ -52,6 +52,11 @@ Route::group('index', [
'diagram_list'
=>
[
'index/member.index/diagram_list'
,
[
'method'
=>
'get'
]
],
'diagram_list'
=>
[
'index/member.index/diagram_list'
,
[
'method'
=>
'get'
]
],
'entrust_list'
=>
[
'index/member.index/entrust_list'
,
[
'method'
=>
'get'
]
],
'entrust_list'
=>
[
'index/member.index/entrust_list'
,
[
'method'
=>
'get'
]
],
'redis_index'
=>
[
'api/RedisController/index'
,
[
'method'
=>
'get'
]
],
//redis测试
//banner模块
//banner模块
'banner'
=>
[
'index/banner/index'
,
[
'method'
=>
'get'
]
],
'banner'
=>
[
'index/banner/index'
,
[
'method'
=>
'get'
]
],
'advertising'
=>
[
'index/banner/advertising'
,
[
'method'
=>
'get'
]
],
'advertising'
=>
[
'index/banner/advertising'
,
[
'method'
=>
'get'
]
],
...
@@ -372,6 +377,7 @@ Route::group('broker', [
...
@@ -372,6 +377,7 @@ Route::group('broker', [
'searchAgents'
=>
[
'api_broker/OrderLog/searchAgents'
,
[
'method'
=>
'get'
]
],
'searchAgents'
=>
[
'api_broker/OrderLog/searchAgents'
,
[
'method'
=>
'get'
]
],
'searchBargainList'
=>
[
'api_broker/OrderLog/searchBargainList'
,
[
'method'
=>
'get'
]
],
'searchBargainList'
=>
[
'api_broker/OrderLog/searchBargainList'
,
[
'method'
=>
'get'
]
],
'getListByHouseId'
=>
[
'api_broker/OrderLog/getListByHouseId'
,
[
'method'
=>
'get'
]
],
'searchBargainAgents'
=>
[
'api_broker/OrderLog/searchBargainAgents'
,
[
'method'
=>
'get'
]
],
'searchBargainAgents'
=>
[
'api_broker/OrderLog/searchBargainAgents'
,
[
'method'
=>
'get'
]
],
'isBargainEnd'
=>
[
'api_broker/OrderLog/isBargainEnd'
,
[
'method'
=>
'get'
]
],
'isBargainEnd'
=>
[
'api_broker/OrderLog/isBargainEnd'
,
[
'method'
=>
'get'
]
],
...
...
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