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
b4735183
Commit
b4735183
authored
Mar 18, 2021
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
fix See merge request
!452
parents
c47176be
6734f4de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
ExploreAppController.php
wallet/controllers/ExploreAppController.php
+13
-8
No files found.
wallet/controllers/ExploreAppController.php
View file @
b4735183
...
@@ -24,7 +24,7 @@ class ExploreAppController extends BaseController
...
@@ -24,7 +24,7 @@ class ExploreAppController extends BaseController
if
(
Yii
::
$app
->
request
->
isPost
)
{
if
(
Yii
::
$app
->
request
->
isPost
)
{
$params
=
Yii
::
$app
->
request
->
post
();
$params
=
Yii
::
$app
->
request
->
post
();
if
(
'administrator'
==
$group
)
{
if
(
'administrator'
==
$group
)
{
$params
[
'platform_id'
]
=
$params
[
'platform_id'
]
;
$params
[
'platform_id'
]
=
isset
(
$params
[
'platform_id'
])
?
$params
[
'platform_id'
]
:
Yii
::
$app
->
request
->
getPlatformId
()
;
}
else
{
}
else
{
$params
[
'platform_id'
]
=
Yii
::
$app
->
request
->
getPlatformId
();
$params
[
'platform_id'
]
=
Yii
::
$app
->
request
->
getPlatformId
();
}
}
...
@@ -99,7 +99,8 @@ class ExploreAppController extends BaseController
...
@@ -99,7 +99,8 @@ class ExploreAppController extends BaseController
}
}
$model
=
ExploreAppCategory
::
findOne
(
$id
);
$model
=
ExploreAppCategory
::
findOne
(
$id
);
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -146,9 +147,10 @@ class ExploreAppController extends BaseController
...
@@ -146,9 +147,10 @@ class ExploreAppController extends BaseController
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
$model
=
ExploreAppCategory
::
find
()
->
where
([
'id'
=>
$id
,
'platform_id'
=>
$platform_id
])
->
one
();
$model
=
ExploreAppCategory
::
find
()
->
where
([
'id'
=>
$id
])
->
one
();
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -206,7 +208,8 @@ class ExploreAppController extends BaseController
...
@@ -206,7 +208,8 @@ class ExploreAppController extends BaseController
$model
=
new
ExploreApp
();
$model
=
new
ExploreApp
();
$model
->
setScenario
(
ExploreApp
::
SCENARIOS_CREATE
);
$model
->
setScenario
(
ExploreApp
::
SCENARIOS_CREATE
);
$params
=
Yii
::
$app
->
request
->
post
();
$params
=
Yii
::
$app
->
request
->
post
();
$params
[
'platform_id'
]
=
$platform_id
;
$AppCategory
=
ExploreAppCategory
::
find
()
->
select
(
'platform_id'
)
->
where
([
'id'
=>
$params
[
'app_category_id'
]])
->
asArray
()
->
one
();
$params
[
'platform_id'
]
=
(
int
)
$AppCategory
[
'platform_id'
]
??
0
;
$params
[
'email'
]
=
isset
(
$params
[
'email'
])
?
$params
[
'email'
]
:
0
;
$params
[
'email'
]
=
isset
(
$params
[
'email'
])
?
$params
[
'email'
]
:
0
;
$params
[
'phone'
]
=
isset
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
0
;
$params
[
'phone'
]
=
isset
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
0
;
$params
[
'real_name'
]
=
isset
(
$params
[
'real_name'
])
?
$params
[
'real_name'
]
:
0
;
$params
[
'real_name'
]
=
isset
(
$params
[
'real_name'
])
?
$params
[
'real_name'
]
:
0
;
...
@@ -254,7 +257,8 @@ class ExploreAppController extends BaseController
...
@@ -254,7 +257,8 @@ class ExploreAppController extends BaseController
}
}
$model
=
ExploreApp
::
findOne
(
$id
);
$model
=
ExploreApp
::
findOne
(
$id
);
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -298,9 +302,10 @@ class ExploreAppController extends BaseController
...
@@ -298,9 +302,10 @@ class ExploreAppController extends BaseController
goto
doEnd
;
goto
doEnd
;
}
}
if
(
Yii
::
$app
->
request
->
isDelete
)
{
if
(
Yii
::
$app
->
request
->
isDelete
)
{
$model
=
ExploreApp
::
find
()
->
where
([
'id'
=>
$id
,
'platform_id'
=>
$platform_id
])
->
one
();
$model
=
ExploreApp
::
find
()
->
where
([
'id'
=>
$id
])
->
one
();
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$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