|
@@ -72,7 +72,7 @@ class Confirm extends Base
|
|
|
if ($orderLife->isEmpty()) return errorTrans("empty.data");
|
|
if ($orderLife->isEmpty()) return errorTrans("empty.data");
|
|
|
$order = (new SaasOrder)->where("order_id",$param['order'])->where("status","in",[1,2,4])->findOrEmpty();
|
|
$order = (new SaasOrder)->where("order_id",$param['order'])->where("status","in",[1,2,4])->findOrEmpty();
|
|
|
if (!$order->isEmpty()) return error("请勿重复提交");
|
|
if (!$order->isEmpty()) return error("请勿重复提交");
|
|
|
- $param['service_type'] = $orderLife['store']['service_type'];
|
|
|
|
|
|
|
+// $param['service_type'] = $orderLife['store']['service_type'];
|
|
|
$address = !empty($param['address']) ? json_decode($param['address'],true): [];
|
|
$address = !empty($param['address']) ? json_decode($param['address'],true): [];
|
|
|
$param['order_sn'] = CodeExtend::random(18,1,date("md"));
|
|
$param['order_sn'] = CodeExtend::random(18,1,date("md"));
|
|
|
$param['order_id'] = $param['order'];
|
|
$param['order_id'] = $param['order'];
|
|
@@ -83,6 +83,7 @@ class Confirm extends Base
|
|
|
$param['product_id'] = $orderLife['out_id'];
|
|
$param['product_id'] = $orderLife['out_id'];
|
|
|
$param['product_name'] = $orderLife['product_name'];
|
|
$param['product_name'] = $orderLife['product_name'];
|
|
|
$param['status'] = 1;
|
|
$param['status'] = 1;
|
|
|
|
|
+ $param['express_status'] = 0;
|
|
|
$param['username'] = $address['username']??'';
|
|
$param['username'] = $address['username']??'';
|
|
|
$param['mobile'] = $address['mobile']??'';
|
|
$param['mobile'] = $address['mobile']??'';
|
|
|
$param['region'] = $address['region']??'';
|
|
$param['region'] = $address['region']??'';
|
|
@@ -92,8 +93,7 @@ class Confirm extends Base
|
|
|
$param['certificate_id'] = $orderDetail['data']['certificate_info_list'][0]['certificate_id'];
|
|
$param['certificate_id'] = $orderDetail['data']['certificate_info_list'][0]['certificate_id'];
|
|
|
$param['lock_key'] = strtoupper(CodeExtend::random(18,3));
|
|
$param['lock_key'] = strtoupper(CodeExtend::random(18,3));
|
|
|
// 锁码
|
|
// 锁码
|
|
|
- $endTime = strtotime("+{$orderLife['store']['code_time']} day");
|
|
|
|
|
- $resp = (new DouyinOrder)->config($this->getDyConfig())->token()->orderLock(2,$param['order'],$param['certificate_id'],$param['lock_key'],time(),$endTime);
|
|
|
|
|
|
|
+ $resp = (new DouyinOrder)->config($this->getDyConfig())->token()->orderLock(2,$param['order'],$param['certificate_id'],$param['lock_key']);
|
|
|
if ($resp['err_no'] <> 0) return error("订单数据异常");
|
|
if ($resp['err_no'] <> 0) return error("订单数据异常");
|
|
|
$orderLife->status = 2;
|
|
$orderLife->status = 2;
|
|
|
$orderLife->save();
|
|
$orderLife->save();
|