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
b8451dc3
Commit
b8451dc3
authored
Aug 27, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成交单数
parent
5dee6ab0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
0 deletions
+62
-0
Performance.php
application/api_broker/controller/Performance.php
+24
-0
PerformanceService.php
application/api_broker/service/PerformanceService.php
+17
-0
OBargainModel.php
application/model/OBargainModel.php
+20
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Performance.php
View file @
b8451dc3
...
...
@@ -625,4 +625,28 @@ class Performance extends Basic
}
}
/**
* 成交单数 成交报告
* @return \think\Response
*/
public
function
bargainSumPcInfo
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
//默认排序一周
$end_day
=
!
empty
(
$params
[
"end_time"
])
?
$params
[
"end_time"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_time"
])
?
$params
[
"start_time"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
getBargainSumPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
}
}
}
application/api_broker/service/PerformanceService.php
View file @
b8451dc3
...
...
@@ -792,6 +792,22 @@ class PerformanceService
return
[
"code"
=>
200
,
"date"
=>
$list
];
}
public
function
getBargainSumPcInfo
(
$id
,
$type
,
$start_time
,
$end_time
,
$page_no
,
$page_size
)
{
$params
=
$this
->
getAgentIdPcInfo
(
$id
,
$type
,
$start_time
,
$end_time
);
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.create_time,a.trade_type,a.scale_fee,c.landmark,d.user_phone,d.user_name"
;
$m_bargain
=
new
OBargainModel
();
$list
=
$m_bargain
->
getBargainSumList
(
$field
,
$params
,
$page_size
,
$page_no
);
foreach
(
$list
as
$key
=>
$val
)
{
$list
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
}
return
[
"code"
=>
200
,
"date"
=>
$list
];
}
}
\ No newline at end of file
application/model/OBargainModel.php
View file @
b8451dc3
...
...
@@ -1395,4 +1395,23 @@ class OBargainModel extends Model
return
$result
;
}
public
function
getBargainSumList
(
$field
,
$params
,
$page_size
,
$page_no
)
{
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$params
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
order
(
"a.id asc"
)
->
select
();
// echo $this->getLastSql();
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
b8451dc3
...
...
@@ -552,6 +552,7 @@ Route::group('broker', [
'housingResourcePcInfo'
=>
[
'api_broker/Performance/housingResourcePcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//新增商铺
'userResourcePcInfo'
=>
[
'api_broker/Performance/userResourcePcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//新增客户
'teamNumPcInfo'
=>
[
'api_broker/Performance/teamNumPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//团队人数
'bargainSumPcInfo'
=>
[
'api_broker/Performance/bargainSumPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//成交单数
//user
...
...
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