Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
wallet
token
Commits
15074f33
Commit
15074f33
authored
Dec 18, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b61b876f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
NoticeController.php
wallet/controllers/NoticeController.php
+4
-4
No files found.
wallet/controllers/NoticeController.php
View file @
15074f33
...
@@ -49,7 +49,7 @@ class NoticeController extends BaseController
...
@@ -49,7 +49,7 @@ class NoticeController extends BaseController
}
}
$status
=
Yii
::
$app
->
request
->
get
(
'status'
,
0
);
$status
=
Yii
::
$app
->
request
->
get
(
'status'
,
0
);
$type
=
Yii
::
$app
->
request
->
get
(
'type'
,
0
);
$type
=
Yii
::
$app
->
request
->
get
(
'type'
,
0
);
$query
=
Notice
::
find
()
->
where
([
'platform_id'
=>
$platform_id
])
->
orderBy
(
'create_time desc'
);
;
$query
=
Notice
::
find
()
->
where
([
'platform_id'
=>
$platform_id
]);
if
(
false
!=
$status
)
{
if
(
false
!=
$status
)
{
$query
->
andWhere
([
'status'
=>
(
int
)
$status
]);
$query
->
andWhere
([
'status'
=>
(
int
)
$status
]);
...
@@ -57,7 +57,7 @@ class NoticeController extends BaseController
...
@@ -57,7 +57,7 @@ class NoticeController extends BaseController
if
(
false
!=
$type
)
{
if
(
false
!=
$type
)
{
$query
->
andWhere
([
'type'
=>
(
int
)
$type
]);
$query
->
andWhere
([
'type'
=>
(
int
)
$type
]);
}
}
$model
=
$query
->
offset
((
$page
-
1
)
*
$size
)
->
orderBy
(
'create_time'
)
->
limit
(
$size
)
->
asArray
()
->
all
();
$model
=
$query
->
offset
((
$page
-
1
)
*
$size
)
->
orderBy
(
'create_time
desc
'
)
->
limit
(
$size
)
->
asArray
()
->
all
();
$countQuery
=
clone
$query
;
$countQuery
=
clone
$query
;
$pages
=
new
Pagination
([
'totalCount'
=>
$countQuery
->
count
(),
'pageSize'
=>
$size
]);
$pages
=
new
Pagination
([
'totalCount'
=>
$countQuery
->
count
(),
'pageSize'
=>
$size
]);
...
@@ -103,7 +103,7 @@ class NoticeController extends BaseController
...
@@ -103,7 +103,7 @@ class NoticeController extends BaseController
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
if
(
User
::
AUTH_SUPER
!=
$group
&&
$platform_id
!=
$model
->
platform_id
)
{
if
(
User
::
AUTH_SUPER
!=
$group
&&
$platform_id
!=
$model
->
platform_id
){
$msg
=
'无权操作'
;
$msg
=
'无权操作'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -137,7 +137,7 @@ class NoticeController extends BaseController
...
@@ -137,7 +137,7 @@ class NoticeController extends BaseController
}
}
if
(
Yii
::
$app
->
request
->
isDelete
)
{
if
(
Yii
::
$app
->
request
->
isDelete
)
{
$model
=
Notice
::
findOne
(
$id
);
$model
=
Notice
::
findOne
(
$id
);
if
(
User
::
AUTH_SUPER
!=
$group
&&
$platform_id
!=
$model
->
platform_id
)
{
if
(
User
::
AUTH_SUPER
!=
$group
&&
$platform_id
!=
$model
->
platform_id
){
$msg
=
'无权删除'
;
$msg
=
'无权删除'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
...
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