|
@@ -6,7 +6,7 @@ use Dever;
|
|
|
|
|
|
class Core
|
|
|
{
|
|
|
- public function create_test_api()
|
|
|
+ public function create_test()
|
|
|
{
|
|
|
$order_id = Dever::input('order_id');
|
|
|
$order = Dever::db('act/order')->one(array('order_id' => $order_id));
|
|
@@ -18,7 +18,7 @@ class Core
|
|
|
public function createCodeByOrder($order, $num = 0)
|
|
|
{
|
|
|
$code = '';
|
|
|
- if ($order['type'] == 3) {
|
|
|
+ if ($order['type'] == 3 && !$order['code']) {
|
|
|
Dever::setInput('set_product_id', $order['product_id']);
|
|
|
# 购买兑换码
|
|
|
$product_num = 1;
|
|
@@ -41,7 +41,6 @@ class Core
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- echo $code_num;die;
|
|
|
if ($code_num > 1) {
|
|
|
$product_num = intval($product_num/$code_num);
|
|
|
|