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
ba081a2b
Commit
ba081a2b
authored
Apr 15, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
397c7687
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
20 deletions
+28
-20
AAgents.php
application/model/AAgents.php
+2
-0
ResultsSummaryTask.php
application/task/controller/ResultsSummaryTask.php
+26
-20
No files found.
application/model/AAgents.php
View file @
ba081a2b
...
@@ -367,6 +367,8 @@ class AAgents extends BaseModel
...
@@ -367,6 +367,8 @@ class AAgents extends BaseModel
{
{
return
Db
::
table
(
$this
->
table
)
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
field
(
$field
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
->
select
();
}
}
...
...
application/task/controller/ResultsSummaryTask.php
View file @
ba081a2b
...
@@ -44,26 +44,32 @@ class ResultsSummaryTask
...
@@ -44,26 +44,32 @@ class ResultsSummaryTask
public
function
totalAgentResults
()
public
function
totalAgentResults
()
{
{
set_time_limit
(
0
);
// ignore_user_abort(); // 后台运行
//todo 1.分页查询经纪人, 2遍历执行,判断一个经纪人在统计表最后一条统计数据的日期
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
//TODO 3.日期加一天并判断是否大于等于当前时间大于return 4.执行此日期的统计,5.当次日期小于当前日期,递归日期加一。继续统计
//do {
$total
=
$this
->
agentsModel
->
getAgentsCountByTask
();
//todo 1.分页查询经纪人, 2遍历执行,判断一个经纪人在统计表最后一条统计数据的日期
//TODO 3.日期加一天并判断是否大于等于当前时间大于return 4.执行此日期的统计,5.当次日期小于当前日期,递归日期加一。继续统计
$pageSize
=
50
;
$total
=
$this
->
agentsModel
->
getAgentsCountByTask
();
$pageTotal
=
ceil
(
$total
/
$pageSize
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$pageSize
=
200
;
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id"
);
$pageTotal
=
ceil
(
$total
/
$pageSize
);
$this
->
executeTotal
(
$resultArr
);
echo
$pageTotal
;
unset
(
$resultArr
);
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
}
echo
$pageNo
;
unset
(
$this
->
agentsModel
);
$resultArr
=
$this
->
agentsModel
->
getAgentsListByTask
(
$pageNo
,
$pageSize
,
"id,store_id,district_id"
);
unset
(
$this
->
tAgentTotalModel
);
$this
->
executeTotal
(
$resultArr
);
unset
(
$this
->
houseModel
);
unset
(
$resultArr
);
unset
(
$this
->
userModel
);
}
unset
(
$this
->
bargainModel
);
unset
(
$this
->
agentsModel
);
unset
(
$this
->
reportModel
);
unset
(
$this
->
tAgentTotalModel
);
unset
(
$this
->
marchInModel
);
unset
(
$this
->
houseModel
);
unset
(
$this
->
payLogModel
);
unset
(
$this
->
userModel
);
unset
(
$this
->
bargainModel
);
unset
(
$this
->
reportModel
);
unset
(
$this
->
marchInModel
);
unset
(
$this
->
payLogModel
);
// } while (true);
}
}
...
...
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