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
48e17eca
Commit
48e17eca
authored
Sep 13, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
ee558fcf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
13 deletions
+28
-13
InviteTotal.php
application/index/controller/InviteTotal.php
+17
-12
Users.php
application/model/Users.php
+10
-0
inviteStatisticsList.js
public/resource/js/inviteStatisticsList.js
+1
-1
No files found.
application/index/controller/InviteTotal.php
View file @
48e17eca
...
...
@@ -18,14 +18,14 @@ class InviteTotal extends Basic
public
function
getFirstLoginTotal
()
{
$params
=
$this
->
params
;
/* $params = array(
"district_id" => 5,
//"store_id" => 1,
"start_time" => "2018-03-01",
"end_time" => "2018-10-01",
"page_no" => 1,
"page_size" => 30
);*/
/* $params = array(
"district_id" => 5,
//"store_id" => 1,
"start_time" => "2018-03-01",
"end_time" => "2018-10-01",
"page_no" => 1,
"page_size" => 30
);*/
if
(
empty
(
$params
[
"district_id"
]))
{
return
$this
->
response
(
"101"
,
"请选择部门或门店"
);
}
else
{
...
...
@@ -39,7 +39,7 @@ class InviteTotal extends Basic
if
(
empty
(
$params
[
"start_time"
])
||
empty
(
$params
[
"end_time"
]))
{
return
$this
->
response
(
"101"
,
"请选择时间"
);
}
else
{
$param
[
"a.
create_time"
]
=
array
(
"between"
,
array
(
$params
[
"start_time"
],
$params
[
"end_time"
]
)
);
$param
[
"a.
first_login_time"
]
=
array
(
"between"
,
array
(
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
)
);
}
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
...
...
@@ -49,9 +49,11 @@ class InviteTotal extends Basic
$field
=
'count(a.id) num ,b.id,b.name,b.store_id,b.district_id'
;
$param
[
"a.referrer_source"
]
=
20
;
$param
[
"a.status"
]
=
0
;
$userModel
=
new
Users
();
$data_list
=
$userModel
->
getInviteTotal
(
$field
,
$param
,
$page_no
,
$page_size
);
$userModel
=
new
Users
();
$data_list
=
$userModel
->
getInviteTotal
(
$field
,
$param
,
$page_no
,
$page_size
);
$getInviteCount
=
$userModel
->
getInviteCount
(
$param
);
$storeModel
=
new
AStore
();
foreach
(
$data_list
as
$key
=>
$item
)
{
...
...
@@ -61,6 +63,8 @@ class InviteTotal extends Basic
$data_list
[
$key
][
"district_name"
]
=
$info
[
"district_name"
];
$data_list
[
$key
][
"store_name"
]
=
$info
[
"store_name"
];
}
return
$this
->
response
(
"200"
,
"success"
,
$data_list
);
$result
[
"list"
]
=
$data_list
;
$result
[
"total"
]
=
$getInviteCount
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
\ No newline at end of file
application/model/Users.php
View file @
48e17eca
...
...
@@ -923,5 +923,15 @@ class Users extends Model
->
limit
(
$page_size
)
->
select
();
}
public
function
getInviteCount
(
$params
){
return
Db
::
table
(
$this
->
table
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.referrer_id=b.id"
,
"left"
)
->
where
(
$params
)
->
group
(
"b.id"
)
->
count
();
}
}
public/resource/js/inviteStatisticsList.js
View file @
48e17eca
...
...
@@ -72,7 +72,7 @@
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'invite_statistics_list_tpl'
).
innerHTML
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
));
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
invitation
.
pageSize
,
invitation
.
getList
);
...
...
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