作者 王智

文档修改

@@ -290,6 +290,8 @@ class GuanYiCloud extends Api @@ -290,6 +290,8 @@ class GuanYiCloud extends Api
290 // $date['receiver_mobile']='15928552965'; 290 // $date['receiver_mobile']='15928552965';
291 $data['sign'] = $this->sign($data, SECRET); 291 $data['sign'] = $this->sign($data, SECRET);
292 $Array = json_decode(json_encode(json_decode($this->mycurl(URL, $data))), true); 292 $Array = json_decode(json_encode(json_decode($this->mycurl(URL, $data))), true);
  293 + dump($Array);
  294 + die;
293 if ($Array['success'] == false) { 295 if ($Array['success'] == false) {
294 $this->error('订单推送失败'); 296 $this->error('订单推送失败');
295 } 297 }
@@ -356,32 +356,32 @@ class Order extends Api @@ -356,32 +356,32 @@ class Order extends Api
356 { 356 {
357 $UserId = $this->is_token($this->request->header()); 357 $UserId = $this->is_token($this->request->header());
358 $params = $this->request->param(); 358 $params = $this->request->param();
359 - $data = [  
360 - 'user_id' => $UserId,  
361 - 'OrderSn' => $params['OrderSn'],  
362 - 'createtime' => time()  
363 - ];  
364 - $res = Db::name('tuikuan')->insert($data);  
365 - if (!$res) {  
366 - $this->error('申请失败', 0);  
367 - die;  
368 - }  
369 - //修改订单状态  
370 - $res2 = Db::name('order')->where('OrderSn', $params['OrderSn'])->update(  
371 - [  
372 - 'status' => 4,  
373 - 'updatetime' => time()  
374 - ]  
375 - ); 359 +// $data = [
  360 +// 'user_id' => $UserId,
  361 +// 'OrderSn' => $params['OrderSn'],
  362 +// 'createtime' => time()
  363 +// ];
  364 +// $res = Db::name('tuikuan')->insert($data);
  365 +// if (!$res) {
  366 +// $this->error('申请失败', 0);
  367 +// die;
  368 +// }
  369 +// //修改订单状态
  370 +// $res2 = Db::name('order')->where('OrderSn', $params['OrderSn'])->update(
  371 +// [
  372 +// 'status' => 4,
  373 +// 'updatetime' => time()
  374 +// ]
  375 +// );
376 $GuanYiCloud = new GuanYiCloud(); 376 $GuanYiCloud = new GuanYiCloud();
377 $Oid = $GuanYiCloud->GetOrderOid($params['OrderSn']); 377 $Oid = $GuanYiCloud->GetOrderOid($params['OrderSn']);
378 $GuanYiCloud->OrderUpdate($params['OrderSn'], $Oid); 378 $GuanYiCloud->OrderUpdate($params['OrderSn'], $Oid);
379 - if (!$res2) {  
380 - $this->error('订单状态更改失败', 0);  
381 - die;  
382 - } else {  
383 - $this->success('成功', 1);  
384 - } 379 +// if (!$res2) {
  380 +// $this->error('订单状态更改失败', 0);
  381 +// die;
  382 +// } else {
  383 +// $this->success('成功', 1);
  384 +// }
385 } 385 }
386 386
387 387
@@ -207,7 +207,7 @@ class Pay extends Api @@ -207,7 +207,7 @@ class Pay extends Api
207 ); 207 );
208 //添加用户积分记录 208 //添加用户积分记录
209 $Fuser_idSql2 = [ 209 $Fuser_idSql2 = [
210 - 'user_id' => $PayOrderInfo['user_id'], 210 + 'user_id' => $Fuser_id,
211 'status' => 1, 211 'status' => 1,
212 'type' => 9, 212 'type' => 9,
213 'num' => floor($OrderInfo['total']), 213 'num' => floor($OrderInfo['total']),
@@ -354,12 +354,12 @@ class Pay extends Api @@ -354,12 +354,12 @@ class Pay extends Api
354 $RecordedFirstMoney = array_sum($FirstMoney); 354 $RecordedFirstMoney = array_sum($FirstMoney);
355 $FirstUserInfoArray = Db::name('user')->where('id', $FatherUserId)->find(); 355 $FirstUserInfoArray = Db::name('user')->where('id', $FatherUserId)->find();
356 //扣除积分 增加余额 356 //扣除积分 增加余额
357 - Db::name('user')->where('id', $FatherUserId)->update(  
358 - [  
359 -// 'num' => $FirstUserInfoArray['num'] - $RecordedFirstMoney,  
360 - 'money' => $FirstUserInfoArray['money'] + $RecordedFirstMoney  
361 - ]  
362 - ); 357 +// Db::name('user')->where('id', $FatherUserId)->update(
  358 +// [
  359 +//// 'num' => $FirstUserInfoArray['num'] - $RecordedFirstMoney,
  360 +// 'money' => $FirstUserInfoArray['money'] + $RecordedFirstMoney
  361 +// ]
  362 +// );
363 //添加用户积分记录 363 //添加用户积分记录
364 // $FirstNumuSql = [ 364 // $FirstNumuSql = [
365 // 'user_id' => $FatherUserId, 365 // 'user_id' => $FatherUserId,
@@ -408,12 +408,12 @@ class Pay extends Api @@ -408,12 +408,12 @@ class Pay extends Api
408 $RecordedSecondMoney = array_sum($SecondMoney); 408 $RecordedSecondMoney = array_sum($SecondMoney);
409 $SecondUserInfoArray = Db::name('user')->where('id', $GroundFatherUserId)->find(); 409 $SecondUserInfoArray = Db::name('user')->where('id', $GroundFatherUserId)->find();
410 //扣除积分 增加余额 410 //扣除积分 增加余额
411 - Db::name('user')->where('id', $GroundFatherUserId)->update(  
412 - [  
413 -// 'num' => $SecondUserInfoArray['num'] - $RecordedSecondMoney,  
414 - 'money' => $SecondUserInfoArray['money'] + $RecordedSecondMoney  
415 - ]  
416 - ); 411 +// Db::name('user')->where('id', $GroundFatherUserId)->update(
  412 +// [
  413 +//// 'num' => $SecondUserInfoArray['num'] - $RecordedSecondMoney,
  414 +// 'money' => $SecondUserInfoArray['money'] + $RecordedSecondMoney
  415 +// ]
  416 +// );
417 // //添加用户积分记录 417 // //添加用户积分记录
418 // $SecondNumuSql = [ 418 // $SecondNumuSql = [
419 // 'user_id' => $GroundFatherUserId, 419 // 'user_id' => $GroundFatherUserId,