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
f2792ed9
Commit
f2792ed9
authored
Apr 01, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本 和日报周报
parent
7a99e1ee
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
Statement.php
application/api_broker/controller/Statement.php
+2
-2
StatementService.php
application/api_broker/service/StatementService.php
+8
-1
Version.php
application/index/controller/Version.php
+0
-1
AAgents.php
application/model/AAgents.php
+1
-1
AppVersion.php
application/model/AppVersion.php
+2
-2
No files found.
application/api_broker/controller/Statement.php
View file @
f2792ed9
...
@@ -31,11 +31,11 @@ class Statement extends Basic
...
@@ -31,11 +31,11 @@ class Statement extends Basic
{
{
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
$params
=
array
(
"agent_id"
=>
3
,
"agent_id"
=>
3
,
"time_start"
=>
date
(
"Y-m-d"
,
time
()),
"time_start"
=>
date
(
"Y-m-d"
,
time
()),
"time_end"
=>
date
(
"Y-m-d"
,
time
())
.
" 23:59:59"
,
"time_end"
=>
date
(
"Y-m-d"
,
time
())
.
" 23:59:59"
,
);
*/
);
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"time_start"
])
||
!
isset
(
$params
[
"time_end"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"time_start"
])
||
!
isset
(
$params
[
"time_end"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
...
...
application/api_broker/service/StatementService.php
View file @
f2792ed9
...
@@ -146,7 +146,12 @@ class StatementService
...
@@ -146,7 +146,12 @@ class StatementService
$last_week_end_time
=
date
(
"Y-m-d"
.
" 23:59:59"
,
strtotime
(
"
$time_start
-1 day"
));
$last_week_end_time
=
date
(
"Y-m-d"
.
" 23:59:59"
,
strtotime
(
"
$time_start
-1 day"
));
$where_
[
"quit_time"
]
=
array
(
'between'
,
array
(
$last_week_start_time
,
$last_week_end_time
)
);
$where_
[
"quit_time"
]
=
array
(
'between'
,
array
(
$last_week_start_time
,
$last_week_end_time
)
);
$where_
[
"district_id"
]
=
$district_id
;
$where_
[
"district_id"
]
=
$district_id
;
$result
=
$this
->
agentModel
->
countAgentNum
(
$where_
);
$result
=
$this
->
agentModel
->
countAgentNum
(
$where_
);
//上周人数
$conditions_
=
$conditions
;
$conditions_
[
"district_id"
]
=
$district_id
;
//本周人数
$results
=
$this
->
agentModel
->
countAgentNum
(
$conditions_
);
dump
(
$results
);
$last_week_total
=
0
;
$last_week_total
=
0
;
foreach
(
$result
as
$key
=>
$value
){
foreach
(
$result
as
$key
=>
$value
){
$last_week_total
+=
$value
[
"agent_num"
];
$last_week_total
+=
$value
[
"agent_num"
];
...
@@ -154,6 +159,8 @@ class StatementService
...
@@ -154,6 +159,8 @@ class StatementService
$paramArr
[
"level"
]
=
array
(
"in"
,[
20
,
40
]);
$paramArr
[
"level"
]
=
array
(
"in"
,[
20
,
40
]);
$agentsResult
=
$this
->
agentModel
->
getAgentsByStoreId
(
$paramArr
);
$agentsResult
=
$this
->
agentModel
->
getAgentsByStoreId
(
$paramArr
);
$result
[
$key
][
"name"
]
=
count
(
$agentsResult
)
>
0
?
$agentsResult
[
0
][
"name"
]
:
null
;
$result
[
$key
][
"name"
]
=
count
(
$agentsResult
)
>
0
?
$agentsResult
[
0
][
"name"
]
:
null
;
$result
[
$key
][
"last_week_num"
]
=
$value
[
"agent_num"
];
$result
[
$key
][
"agent_num"
]
=
$results
[
$key
][
"agent_num"
];
}
}
$district_list
[
"last_week_total"
]
=
$last_week_total
;
$district_list
[
"last_week_total"
]
=
$last_week_total
;
$district_list
[
"district_list"
]
=
$result
;
$district_list
[
"district_list"
]
=
$result
;
...
...
application/index/controller/Version.php
View file @
f2792ed9
...
@@ -61,7 +61,6 @@ class Version extends Basic
...
@@ -61,7 +61,6 @@ class Version extends Basic
if
(
$param
[
"type"
]
==
'android'
&&
isset
(
$param
[
"app_path"
]))
{
if
(
$param
[
"type"
]
==
'android'
&&
isset
(
$param
[
"app_path"
]))
{
$this
->
response
(
"101"
,
"安卓请上传安装包"
);
$this
->
response
(
"101"
,
"安卓请上传安装包"
);
}
}
$param
[
"type"
]
=
$param
[
"type"
]
==
"android"
?
1
:
0
;
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$param
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$result
=
$this
->
appVersion
->
addVersion
(
$param
);
$result
=
$this
->
appVersion
->
addVersion
(
$param
);
...
...
application/model/AAgents.php
View file @
f2792ed9
...
@@ -415,7 +415,7 @@ class AAgents extends BaseModel
...
@@ -415,7 +415,7 @@ class AAgents extends BaseModel
})
})
->
group
(
"a.store_id"
)
->
group
(
"a.store_id"
)
->
select
();
->
select
();
//
echo Db::table($this->table)->getLastSql();
echo
Db
::
table
(
$this
->
table
)
->
getLastSql
();
return
$result
;
return
$result
;
}
}
...
...
application/model/AppVersion.php
View file @
f2792ed9
...
@@ -16,10 +16,10 @@ class AppVersion extends Model
...
@@ -16,10 +16,10 @@ class AppVersion extends Model
* @return mixed
* @return mixed
*/
*/
public
function
getVersion
(
$type
=
'
android
'
)
public
function
getVersion
(
$type
=
'
1
'
)
{
{
$type
=
$type
==
'android'
?
1
:
0
;
//
$type = $type == 'android' ? 1 : 0;
$param
[
"type"
]
=
$type
;
$param
[
"type"
]
=
$type
;
$param
[
"is_del"
]
=
0
;
$param
[
"is_del"
]
=
0
;
// return $this->field("id,version_no,type,create_time,intro,CONCAT('".CK_IMG_URL."' , app_path) as app_path")
// return $this->field("id,version_no,type,create_time,intro,CONCAT('".CK_IMG_URL."' , app_path) as app_path")
...
...
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