Browse Source

easywechat绑定新request

master
weigang 6 years ago
parent
commit
f6dab71db5
  1. 17
      app/Controller/NotifyController.php
  2. 2
      app/Model/Goods.php
  3. 1
      app/Model/Order.php
  4. 1
      app/Model/OrderGoods.php
  5. 2
      app/Model/OrderSalesStatistic.php
  6. 1
      app/Model/SpecCombination.php
  7. 1
      app/Model/SystemConfig.php
  8. 1
      app/Model/Users.php

17
app/Controller/NotifyController.php

@ -20,6 +20,7 @@ use Hyperf\DbConnection\Db;
use Hyperf\Guzzle\CoroutineHandler;
use Exception;
use Hyperf\Di\Annotation\Inject;
use Symfony\Component\HttpFoundation\Request;
class NotifyController extends BaseController
{
@ -54,6 +55,16 @@ class NotifyController extends BaseController
$config = config('wxpay');
$app = Factory::payment($config);
$app['guzzle_handler'] = CoroutineHandler::class;
$get = $this->request->getQueryParams();
$post = $this->request->getParsedBody();
$cookie = $this->request->getCookieParams();
$files = $this->request->getUploadedFiles();
$server = $this->request->getServerParams();
$xml = $this->request->getBody()->getContents();
$app['request'] = new Request($get,$post,[],$cookie,$files,$server,$xml);
var_dump('inside');
// 通知回调,进行业务处理
Db::beginTransaction();
@ -109,9 +120,7 @@ class NotifyController extends BaseController
}
}
// return true;
return true;
}
// 修改订单、子订单状态
@ -188,6 +197,8 @@ class NotifyController extends BaseController
$res = $this->feiePrintService->feiePrint($orderMain->order_num);
var_dump($res);
return true;
});
var_dump('$response', $response);

2
app/Model/Goods.php

@ -9,4 +9,6 @@ class Goods extends Model
const INVENTORY_NOLIMIT = 1;
protected $table = 'ims_cjdc_goods';
public $timestamps = false;
}

1
app/Model/Order.php

@ -7,5 +7,6 @@ namespace App\Model;
class Order extends Model
{
protected $table = 'ims_cjdc_order';
public $timestamps = false;
}

1
app/Model/OrderGoods.php

@ -5,4 +5,5 @@ namespace App\Model;
class OrderGoods extends Model
{
protected $table = 'ims_cjdc_order_goods';
public $timestamps = false;
}

2
app/Model/OrderSalesStatistic.php

@ -26,4 +26,6 @@ class OrderSalesStatistic extends Model
* @var array
*/
protected $casts = [];
public $timestamps = false;
}

1
app/Model/SpecCombination.php

@ -8,6 +8,7 @@ class SpecCombination extends Model
{
protected $table = 'ims_cjdc_spec_combination';
public $timestamps = false;
public function goods()
{

1
app/Model/SystemConfig.php

@ -7,4 +7,5 @@ namespace App\Model;
class SystemConfig extends Model
{
protected $table = 'ims_cjdc_system_config';
public $timestamps = false;
}

1
app/Model/Users.php

@ -5,4 +5,5 @@ namespace App\Model;
class Users extends Model
{
protected $table = 'ims_cjdc_user';
public $timestamps = false;
}
Loading…
Cancel
Save