|
@@ -172,10 +172,10 @@ class Order
|
|
|
{
|
|
|
$param = array
|
|
|
(
|
|
|
- 'project_id' => 2,
|
|
|
+ 'project_id' => 4,
|
|
|
'channel_id' => 1,
|
|
|
- 'system_source' => 5,
|
|
|
- 'account_id' => 7,
|
|
|
+ 'system_source' => 1,
|
|
|
+ 'account_id' => 8,
|
|
|
'uid' => $data['id'],
|
|
|
'name' => $data['name'],
|
|
|
'openid' => $data['openid'],
|
|
@@ -240,14 +240,11 @@ class Order
|
|
|
$cash = $send['pay_cash'];
|
|
|
$msg = $send['pay_msg'];
|
|
|
|
|
|
- $order = Dever::db('shop/buy_order')->one(array('id' => $product_id, 'time' => time()));
|
|
|
- if ($order && $order['status'] == 1 && $status == 2) {
|
|
|
- $update['status'] = 2;
|
|
|
+ $order = Dever::db('agent/order')->one(array('id' => $product_id, 'clear' => true));
|
|
|
+ if ($order && $status == 2) {
|
|
|
+ $update['pay_status'] = 2;
|
|
|
$update['where_id'] = $order['id'];
|
|
|
- Dever::db('shop/buy_order')->update($update);
|
|
|
-
|
|
|
- # 生成结算单
|
|
|
- Dever::load('cash/lib/order')->up($order, 1, 1);
|
|
|
+ Dever::db('agent/order')->update($update);
|
|
|
}
|
|
|
|
|
|
return 'ok';
|