生成用户收货码
This commit is contained in:
parent
0acbd431d7
commit
7e80444924
@ -55,7 +55,11 @@ class Auth extends BaseController
|
||||
{
|
||||
public function dotest()
|
||||
{
|
||||
return app('json')->success([]);
|
||||
$code = random_int(1000, 9999);
|
||||
$res = app()->make(StoreOrderRepository::class)->update(0, [
|
||||
'logistics_code' => $code
|
||||
]);
|
||||
return app('json')->success($res);
|
||||
}
|
||||
|
||||
public function test()
|
||||
|
@ -6,6 +6,7 @@ namespace app\listener;
|
||||
use app\common\dao\store\order\StoreCartDao;
|
||||
use app\common\dao\system\merchant\MerchantDao;
|
||||
use app\common\model\system\merchant\Merchant;
|
||||
use app\common\repositories\store\order\StoreOrderRepository;
|
||||
use app\common\repositories\system\merchant\FinancialRecordRepository;
|
||||
use app\common\repositories\system\merchant\MerchantRepository;
|
||||
use crmeb\utils\DingTalk;
|
||||
@ -138,9 +139,19 @@ class paySuccessOrder
|
||||
}
|
||||
//发起物流信息
|
||||
$this->sendLogistics($this->event['order']['order_id'], $this->event['order']['order_sn']);
|
||||
|
||||
//生成商家给的物流取货二维码
|
||||
//生成用户的收货码、发生短信包含收货码
|
||||
$this->generateLogisticsCode($orderId);
|
||||
}
|
||||
|
||||
//用户收货码
|
||||
public function generateLogisticsCode($orderId) {
|
||||
$code = random_int(1000, 9999);
|
||||
$res = app()->make(StoreOrderRepository::class)->update($orderId, [
|
||||
'logistics_code' => $code
|
||||
]);
|
||||
if ($res) {
|
||||
//发生短信
|
||||
}
|
||||
}
|
||||
|
||||
//发送物流
|
||||
|
Loading…
x
Reference in New Issue
Block a user