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
2678f27c
Commit
2678f27c
authored
Sep 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d4aaba65
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
Amercement.php
application/api_broker/controller/Amercement.php
+6
-0
Amercement.php
application/index/controller/Amercement.php
+7
-0
AmercementService.php
application/index/service/AmercementService.php
+0
-5
No files found.
application/api_broker/controller/Amercement.php
View file @
2678f27c
...
@@ -9,6 +9,7 @@ namespace app\api_broker\controller;
...
@@ -9,6 +9,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\VipService
;
use
app\index\service\AmercementService
;
use
app\index\service\AmercementService
;
use
app\model\USpreadUser
;
use
app\model\USpreadUser
;
use
think\Request
;
use
think\Request
;
...
@@ -42,6 +43,11 @@ class Amercement extends Basic
...
@@ -42,6 +43,11 @@ class Amercement extends Basic
return
$this
->
response
(
"300"
,
$checkResult
);
return
$this
->
response
(
"300"
,
$checkResult
);
}
}
$vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$vip
->
checkRule
(
$this
->
agentId
,
'addAmercement'
);
if
(
$is_can_edit
==
1
){
return
$this
->
response
(
"101"
,
"暂无权限"
);
}
$father_id
=
$this
->
s_amercement
->
addAmercement
(
$params
,
$this
->
agentId
);
//int(1)
$father_id
=
$this
->
s_amercement
->
addAmercement
(
$params
,
$this
->
agentId
);
//int(1)
if
(
$father_id
)
{
if
(
$father_id
)
{
$this
->
s_amercement
->
addAmercementImg
(
$params
[
'img'
],
$father_id
);
$this
->
s_amercement
->
addAmercementImg
(
$params
[
'img'
],
$father_id
);
...
...
application/index/controller/Amercement.php
View file @
2678f27c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api_broker\service\VipService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\service\AmercementService
;
use
app\index\service\AmercementService
;
...
@@ -43,6 +44,12 @@ class Amercement extends Basic
...
@@ -43,6 +44,12 @@ class Amercement extends Basic
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
}
}
$vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$vip
->
checkRule
(
$this
->
userId
,
'addAmercement'
);
if
(
$is_can_edit
==
1
){
return
$this
->
response
(
"101"
,
"暂无权限"
);
}
$father_id
=
$this
->
s_amercement
->
addAmercement
(
$params
,
$this
->
userId
);
//int(1)
$father_id
=
$this
->
s_amercement
->
addAmercement
(
$params
,
$this
->
userId
);
//int(1)
if
(
$father_id
)
{
if
(
$father_id
)
{
$this
->
s_amercement
->
addAmercementImg
(
$params
[
'img'
],
$father_id
);
$this
->
s_amercement
->
addAmercementImg
(
$params
[
'img'
],
$father_id
);
...
...
application/index/service/AmercementService.php
View file @
2678f27c
...
@@ -320,11 +320,6 @@ class AmercementService
...
@@ -320,11 +320,6 @@ class AmercementService
switch
(
$edit_type
)
{
switch
(
$edit_type
)
{
case
0
:
case
0
:
//0编辑
//0编辑
$vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$vip
->
checkRule
(
$agent_id
,
'updateAmercement'
);
if
(
$is_can_edit
==
1
){
return
[
'code'
=>
101
,
'msg'
=>
'暂无权限'
];
}
$this
->
updateAmercement
(
$id
,
$params
);
$this
->
updateAmercement
(
$id
,
$params
);
break
;
break
;
case
1
:
case
1
:
...
...
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