Commit 8b08b897 by 冷斌

update

parent 8102fbf8
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</ul> </ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('Luckrate/edit_post')}"> <form method="post" class="form-horizontal js-ajax-form" action="{:U('Luckrate/edit_post')}">
<input type="hidden" name="id" value="{$data['id']}"> <input type="hidden" name="id" value="{$data['id']}">
<input type="hidden" name="giftid" value="{$giftid}">
<fieldset> <fieldset>
<div class="control-group"> <div class="control-group">
<label class="control-label">数量</label> <label class="control-label">数量</label>
......
...@@ -127,7 +127,7 @@ class LuckrateController extends AdminbaseController { ...@@ -127,7 +127,7 @@ class LuckrateController extends AdminbaseController {
if($check){ if($check){
$this->error('相同数量、倍数的配置已存在'); $this->error('相同数量、倍数的配置已存在');
} }
$check = M("luck_rate")->where("giftid='{$giftid}' and id!={$id}")->sum('rate'); $check = $jackpot->where("giftid='{$giftid}' and id!={$id}")->sum('rate');
var_dump(($check + I('rate')), $check, I('rate')); var_dump(($check + I('rate')), $check, I('rate'));
die; die;
if(($check + I('rate')) > 100){ if(($check + I('rate')) > 100){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment