更新
This commit is contained in:
parent
2ec0151af7
commit
edd4f5bef7
@ -71,14 +71,7 @@ class OrderLogic extends BaseLogic
|
||||
static public function createOrder($cartId, $addressId, $user = null, $params = [])
|
||||
{
|
||||
$orderInfo = self::cartIdByOrderInfo($cartId, $addressId, $user, $params);
|
||||
if($addressId>0){
|
||||
$address=UserAddress::where(['address_id'=>$addressId,'uid'=>Request()->userId])->find();
|
||||
if($address){
|
||||
$_order['real_name'] = $address['real_name'];
|
||||
$_order['user_phone'] = $address['phone'];
|
||||
$_order['user_address'] = $address['detail'];
|
||||
}
|
||||
}
|
||||
|
||||
$_order = $orderInfo['order'];
|
||||
$_order['deduction_price'] = 0;
|
||||
$_order['merchant'] = $params['mer_id'];
|
||||
@ -89,6 +82,14 @@ class OrderLogic extends BaseLogic
|
||||
$_order['payinfo'] = '';
|
||||
$_order['type'] = 0;
|
||||
$_order['actual'] = $_order['total'];
|
||||
if($addressId>0){
|
||||
$address=UserAddress::where(['address_id'=>$addressId,'uid'=>Request()->userId])->find();
|
||||
if($address){
|
||||
$_order['real_name'] = $address['real_name'];
|
||||
$_order['user_phone'] = $address['phone'];
|
||||
$_order['user_address'] = $address['detail'];
|
||||
}
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
$order = Cashierclass::create($_order);
|
||||
|
Loading…
x
Reference in New Issue
Block a user