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
ff7f50ad
Commit
ff7f50ad
authored
Dec 13, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d5d352d1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
0 deletions
+14
-0
CoinPublishController.php
backend/controllers/CoinPublishController.php
+5
-0
list.js
backend/web/js/coin-publish/list.js
+2
-0
CoinPublish.php
common/models/psources/CoinPublish.php
+1
-0
CoinPublishRule.php
common/models/psources/CoinPublishRule.php
+6
-0
No files found.
backend/controllers/CoinPublishController.php
View file @
ff7f50ad
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
backend\controllers
;
namespace
backend\controllers
;
use
common\business\Chain33Business
;
use
common\business\Chain33Business
;
use
common\models\psources\CoinPublishRule
;
use
Yii
;
use
Yii
;
use
backend\models\coin\CoinPublishForm
;
use
backend\models\coin\CoinPublishForm
;
use
common\models\psources\CoinPublish
;
use
common\models\psources\CoinPublish
;
...
@@ -99,6 +100,10 @@ class CoinPublishController extends BaseController
...
@@ -99,6 +100,10 @@ class CoinPublishController extends BaseController
$id
=
Yii
::
$app
->
request
->
get
(
'id'
,
null
);
$id
=
Yii
::
$app
->
request
->
get
(
'id'
,
null
);
if
(
$id
)
{
if
(
$id
)
{
$model
=
CoinPublish
::
findOne
([
'id'
=>
$id
]);
$model
=
CoinPublish
::
findOne
([
'id'
=>
$id
]);
$ruleCount
=
CoinPublishRule
::
getRuleCountByPid
(
$id
);
if
(
$ruleCount
>
0
){
return
[
'code'
=>
-
1
,
'msg'
=>
'存在锁仓规则,无法删除币种监控'
];
}
if
(
$model
->
delete
())
{
if
(
$model
->
delete
())
{
return
[
'code'
=>
0
,
'msg'
=>
'succeed'
];
return
[
'code'
=>
0
,
'msg'
=>
'succeed'
];
}
}
...
...
backend/web/js/coin-publish/list.js
View file @
ff7f50ad
...
@@ -59,6 +59,8 @@ table.on('tool(table1)', function (obj) {
...
@@ -59,6 +59,8 @@ table.on('tool(table1)', function (obj) {
if
(
rev
.
code
==
0
)
{
if
(
rev
.
code
==
0
)
{
obj
.
del
();
obj
.
del
();
layer
.
close
(
index
);
layer
.
close
(
index
);
}
else
{
layer
.
msg
(
rev
.
msg
);
}
}
});
});
});
});
...
...
common/models/psources/CoinPublish.php
View file @
ff7f50ad
...
@@ -30,4 +30,5 @@ class CoinPublish extends BaseActiveRecord
...
@@ -30,4 +30,5 @@ class CoinPublish extends BaseActiveRecord
{
{
return
'{{%coin_publish}}'
;
return
'{{%coin_publish}}'
;
}
}
}
}
common/models/psources/CoinPublishRule.php
View file @
ff7f50ad
...
@@ -53,6 +53,12 @@ class CoinPublishRule extends BaseActiveRecord
...
@@ -53,6 +53,12 @@ class CoinPublishRule extends BaseActiveRecord
return
CoinReleaseMember
::
find
()
->
where
([
'rule_id'
=>
$this
->
id
])
->
count
();
return
CoinReleaseMember
::
find
()
->
where
([
'rule_id'
=>
$this
->
id
])
->
count
();
}
}
public
static
function
getRuleCountByPid
(
$pid
)
{
return
self
::
find
()
->
where
([
'pid'
=>
$pid
])
->
count
();
}
public
function
formName
()
public
function
formName
()
{
{
return
''
;
return
''
;
...
...
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