下单修复
This commit is contained in:
parent
3f1546e7b2
commit
cff6927976
@ -65,7 +65,12 @@ class StoreCartRepository extends BaseRepository
|
||||
$item['product'] = $product_make->getFailProduct($item['product_id']);
|
||||
$fail[] = $item;
|
||||
} else {
|
||||
$merchantData = $item['merchant']->append(['openReceipt'])->toArray();
|
||||
//商户信息
|
||||
if ($item['merchant']){
|
||||
$merchantData = $item['merchant']->append(['openReceipt'])->toArray();
|
||||
} else {
|
||||
$merchantData = ['mer_id' => 0];
|
||||
}
|
||||
unset($item['merchant']);
|
||||
$coupon_make = app()->make(StoreCouponRepository::class);
|
||||
if (!isset($arr[$item['mer_id']])) {
|
||||
@ -98,9 +103,9 @@ class StoreCartRepository extends BaseRepository
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getOne(int $id,int $uid)
|
||||
public function getOne(int $id, int $uid)
|
||||
{
|
||||
$where = [$this->dao->getPk() => $id,'is_del'=>0,'is_fail'=>0,'is_new'=>0,'is_pay'=>0,'uid' => $uid];
|
||||
$where = [$this->dao->getPk() => $id, 'is_del' => 0, 'is_fail' => 0, 'is_new' => 0, 'is_pay' => 0, 'uid' => $uid];
|
||||
return ($this->dao->getWhere($where));
|
||||
}
|
||||
|
||||
@ -110,9 +115,9 @@ class StoreCartRepository extends BaseRepository
|
||||
* @param $uid
|
||||
* @author Qinii
|
||||
*/
|
||||
public function getCartByProductSku($sku,$uid,$product_type=0)
|
||||
public function getCartByProductSku($sku, $uid, $product_type = 0)
|
||||
{
|
||||
$where = ['is_del'=>0,'is_fail'=>0,'is_new'=>0,'is_pay'=>0,'uid' => $uid,'product_type' => $product_type,'product_attr_unique' => $sku];
|
||||
$where = ['is_del' => 0, 'is_fail' => 0, 'is_new' => 0, 'is_pay' => 0, 'uid' => $uid, 'product_type' => $product_type, 'product_attr_unique' => $sku];
|
||||
return ($this->dao->getWhere($where));
|
||||
}
|
||||
|
||||
@ -120,10 +125,10 @@ class StoreCartRepository extends BaseRepository
|
||||
public function getProductById($productId)
|
||||
{
|
||||
$where = [
|
||||
'is_del' =>0,
|
||||
'is_new'=>0,
|
||||
'is_pay'=>0,
|
||||
'product_id'=>$productId
|
||||
'is_del' => 0,
|
||||
'is_new' => 0,
|
||||
'is_pay' => 0,
|
||||
'product_id' => $productId
|
||||
];
|
||||
return $this->dao->getWhereCount($where);
|
||||
}
|
||||
|
@ -777,9 +777,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
'mer_integral_status' => 0,
|
||||
];
|
||||
$allow_no_address = $allow_no_address && $merchantCart['order']['isTake'];
|
||||
foreach ($merchantCart['config'] as $config) {
|
||||
$merchantCart['take'][$config['config_key']] = $config['value'];
|
||||
}
|
||||
// foreach ($merchantCart['config'] as $config) {
|
||||
// $merchantCart['take'][$config['config_key']] = $config['value'];
|
||||
// }
|
||||
$merIntegralConfig = $merchantCart['take'];
|
||||
unset($merchantCart['config']);
|
||||
$merIntegralConfig['mer_integral_rate'] = min(1, $merIntegralConfig['mer_integral_rate'] > 0 ? bcdiv($merIntegralConfig['mer_integral_rate'], 100, 4) : $merIntegralConfig['mer_integral_rate']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user