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
f68a6953
Commit
f68a6953
authored
Mar 01, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报备列表
parent
fb1fe4dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
1 deletion
+61
-1
Report.php
application/api_broker/controller/Report.php
+36
-0
Shop.php
application/api_broker/controller/Shop.php
+1
-1
OReportModel.php
application/model/OReportModel.php
+23
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Report.php
View file @
f68a6953
...
@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
...
@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ReportService
;
use
app\api_broker\service\ReportService
;
use
app\model\FollowUpLogModel
;
use
app\model\FollowUpLogModel
;
use
app\model\OReportModel
;
use
think\Exception
;
use
think\Exception
;
/**
/**
...
@@ -18,12 +19,14 @@ class Report extends Basic
...
@@ -18,12 +19,14 @@ class Report extends Basic
{
{
private
$service_
;
private
$service_
;
private
$fulModel
;
private
$fulModel
;
private
$oReportModel
;
public
function
__construct
(
$request
=
null
)
public
function
__construct
(
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
$this
->
service_
=
new
ReportService
();
$this
->
service_
=
new
ReportService
();
$this
->
fulModel
=
new
FollowUpLogModel
();
$this
->
fulModel
=
new
FollowUpLogModel
();
$this
->
oReportModel
=
new
OReportModel
();
}
}
/**
/**
...
@@ -76,6 +79,39 @@ class Report extends Basic
...
@@ -76,6 +79,39 @@ class Report extends Basic
}
}
/**
* 获取报备列表
* @return \think\Response
*/
public
function
reportList
(){
/* $params = array(
"agent_id" =>1,
);*/
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
);
if
(
count
(
$result
)
>
0
){
foreach
(
$result
as
$k
=>
$v
){
$result
[
$k
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
}
}
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
/**
/**
* 新增跟进
* 新增跟进
...
...
application/api_broker/controller/Shop.php
View file @
f68a6953
...
@@ -216,7 +216,7 @@ class Shop extends Basic
...
@@ -216,7 +216,7 @@ class Shop extends Basic
if
(
$params
[
'site_area'
]
==
1
&&
isset
(
$params
[
'user_id'
]))
{
if
(
$params
[
'site_area'
]
==
1
&&
isset
(
$params
[
'user_id'
]))
{
$attention
[
"user_id"
]
=
array
(
"eq"
,
$params
[
'user_id'
]
);
$attention
[
"user_id"
]
=
array
(
"eq"
,
$params
[
'user_id'
]
);
$attention
[
"house_id"
]
=
array
(
"eq"
,
$params
[
"id"
]
);
$attention
[
"house_id"
]
=
array
(
"eq"
,
$params
[
"id"
]
);
$attention
[
"is_del"
]
=
array
(
"eq"
,
0
);
;
$attention
[
"is_del"
]
=
array
(
"eq"
,
0
);
$attResult
=
$this
->
attentionModel
->
getAttentionByUserIdAndHouseId
(
$attention
);
$attResult
=
$this
->
attentionModel
->
getAttentionByUserIdAndHouseId
(
$attention
);
if
(
count
(
$attResult
)
>
0
)
if
(
count
(
$attResult
)
>
0
)
$result
[
"attention"
]
=
$attResult
[
"id"
];
$result
[
"attention"
]
=
$attResult
[
"id"
];
...
...
application/model/OReportModel.php
View file @
f68a6953
...
@@ -72,4 +72,26 @@ class OReportModel extends Model
...
@@ -72,4 +72,26 @@ class OReportModel extends Model
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
}
}
/**
* @param string $filed
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
selectReportList
(
$filed
=
"id"
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"report_agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"report_agent_id"
];
}
$where_
[
"a.status"
]
=
0
;
$where_
[
"b.is_del"
]
=
0
;
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
}
}
\ No newline at end of file
application/route.php
View file @
f68a6953
...
@@ -252,6 +252,7 @@ Route::group('broker', [
...
@@ -252,6 +252,7 @@ Route::group('broker', [
//商铺
//商铺
'getShopList'
=>
[
'api_broker/Shop/getShopList'
,
[
'method'
=>
'get|post'
]
],
'getShopList'
=>
[
'api_broker/Shop/getShopList'
,
[
'method'
=>
'get|post'
]
],
'getShopDetail'
=>
[
'api_broker/Shop/getShopDetail'
,
[
'method'
=>
'get'
]
],
'getShopDetail'
=>
[
'api_broker/Shop/getShopDetail'
,
[
'method'
=>
'get'
]
],
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'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