|
@@ -19,13 +19,13 @@ class Card
|
|
|
return $len;
|
|
|
}
|
|
|
|
|
|
- public function test1()
|
|
|
+ public function total()
|
|
|
{
|
|
|
$total = Dever::db('youzan/card_list')->total(array('option_state' => 1, 'option_status' => 1));
|
|
|
return Dever::lock($this->lock, $total);
|
|
|
}
|
|
|
|
|
|
- public function test2()
|
|
|
+ public function test1()
|
|
|
{
|
|
|
$len = Dever::queue($this->lock);
|
|
|
return $len;
|
|
@@ -147,8 +147,7 @@ class Card
|
|
|
{
|
|
|
if ($end) {
|
|
|
# 如果执行结束,则加到库存里
|
|
|
- $total = Dever::db('youzan/card_list')->total(array('option_state' => 1, 'option_status' => 1));
|
|
|
- Dever::lock($this->lock, $total);
|
|
|
+ $this->total();
|
|
|
} else {
|
|
|
$info = Dever::db('youzan/card')->one($id);
|
|
|
//$data['response']['promocard']['group_id'] = 1;
|