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
4736bd68
Commit
4736bd68
authored
Jun 19, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信授权
parent
0e3a737c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
2 deletions
+53
-2
PerformanceService.php
application/api_broker/service/PerformanceService.php
+20
-2
Index.php
application/app_broker/controller/Index.php
+33
-0
No files found.
application/api_broker/service/PerformanceService.php
View file @
4736bd68
...
@@ -163,8 +163,9 @@ class PerformanceService
...
@@ -163,8 +163,9 @@ class PerformanceService
$params
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$params
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$result
=
$this
->
nowTimeSum
(
$params
);
$result
=
$this
->
nowTimeSum
(
$params
);
}
else
{
}
else
{
$field
=
"agent_id,sum(look_at_num) as look_at_num,sum(march_in_num) as march_in_num , sum(paylog) as paylog ,
$field
=
"agent_id,sum(add_house_num) as add_house_num,sum(add_user_num) as add_user_num,
sum(bargain_sum) as bargain_sum"
;
sum(performance) as performance,sum(official_receipts) as official_receipts,sum(look_at_num) as look_at_num,
sum(march_in_num) as march_in_num , sum(paylog) as paylog , sum(bargain_sum) as bargain_sum"
;
$where_
[
"agent_id"
]
=
$agent_id
;
$where_
[
"agent_id"
]
=
$agent_id
;
$where_
[
'total_time'
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
$where_
[
'total_time'
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
...
@@ -292,7 +293,24 @@ class PerformanceService
...
@@ -292,7 +293,24 @@ class PerformanceService
*/
*/
private
function
nowTimeSum
(
$params
)
private
function
nowTimeSum
(
$params
)
{
{
$result
=
[];
$result
=
[];
//房源
$addHouseNum
=
$this
->
houseModel
->
getAddHouseNum
(
$totalParams
);
$result
[
"add_house_num"
]
=
isset
(
$addHouseNum
[
0
][
"num"
])
?
$addHouseNum
[
0
][
"num"
]
:
0
;
//客源
$addUserNum
=
$this
->
userModel
->
getAddUserNum
(
$totalParams
);
$result
[
"add_user_num"
]
=
isset
(
$addUserNum
[
0
][
"num"
])
?
$addUserNum
[
0
][
"num"
]
:
0
;
//业绩
$performanceSum
=
$this
->
bargainModel
->
getAddBargainNum
(
$totalParams
,
1
);
//1表示业绩 2表示实收
$result
[
"performance"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//实收
$receivedSum
=
$this
->
bargainModel
->
getAddBargainNum
(
$totalParams
,
2
);
//1表示业绩 2表示实收
$result
[
"official_receipts"
]
=
isset
(
$receivedSum
[
0
][
"num"
])
?
$receivedSum
[
0
][
"num"
]
:
0
;
$reportNum
=
$this
->
reportModel
->
getAddReportNum
(
$params
);
$reportNum
=
$this
->
reportModel
->
getAddReportNum
(
$params
);
$result
[
"look_at_num"
]
=
isset
(
$reportNum
[
0
][
"num"
])
?
$reportNum
[
0
][
"num"
]
:
0
;
$result
[
"look_at_num"
]
=
isset
(
$reportNum
[
0
][
"num"
])
?
$reportNum
[
0
][
"num"
]
:
0
;
...
...
application/app_broker/controller/Index.php
View file @
4736bd68
...
@@ -2,14 +2,47 @@
...
@@ -2,14 +2,47 @@
namespace
app\app_broker\controller
;
namespace
app\app_broker\controller
;
use
app\api\untils\WxCallbackUntils
;
use
app\model\AppVersion
;
use
app\model\AppVersion
;
use
app\model\HouseImgs
;
use
app\model\HouseImgs
;
use
app\model\HouseInfos
;
use
app\model\HouseInfos
;
use
think\Controller
;
use
think\Controller
;
use
think\Log
;
use
think\Response
;
use
think\Response
;
class
Index
class
Index
{
{
private
$url
=
CURRENT_URL
.
"/index/getWxInfo"
;
private
$_wxApi
;
public
function
__construct
()
{
$this
->
_wxApi
=
new
WxCallbackUntils
();
}
public
function
getWxInfo
()
{
$code
=
empty
(
$_GET
[
'code'
])
?
null
:
$_GET
[
'code'
];
$userInfo
=
session
(
"userInfo"
);
if
(
!
$code
)
{
$this
->
_wxApi
->
getWxCode
(
$this
->
url
);
}
else
{
$this
->
_wxApi
->
getUserInfoByAccessToken
(
$code
);
Log
::
record
(
"session wx -----------------"
.
json_encode
(
$userInfo
),
"info"
);
if
(
!
$userInfo
)
{
$this
->
_wxApi
->
getWxCode
(
$this
->
url
);
}
else
{
dump
(
$userInfo
);
return
view
(
"index/index"
);
}
}
}
public
function
achieve_fork
()
public
function
achieve_fork
()
{
{
return
view
(
'index/achieve_fork'
);
return
view
(
'index/achieve_fork'
);
...
...
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