Commit dd4d0980 by 冷斌

add

parent 52f869be
......@@ -33,16 +33,16 @@ class WelfareController extends AdminbaseController
if ($price > 0) {
$jackpot=M("welfare_rate");
$check = $jackpot->where("id=1")->find();
$p = [
'id' => 1,
'giftid' => 0,
'nums' => 0,
'rate' => $price
];
if (empty($check)) {
$p = [
'id' => 1,
'giftid' => 0,
'nums' => 0,
'rate' => $price
];
M("welfare_rate")->add($p);
} else {
$a = M("welfare_rate")->where(array('id' => 1))->save(['price' => $price]);
$a = M("welfare_rate")->where(array('id' => 1))->save(['rate' => $price]);
var_dump($a);
die;
}
......
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