|
|
@@ -103,8 +103,8 @@ class MerchantRepository extends BaseRepository
|
|
103
|
103
|
}
|
|
104
|
104
|
unset($item);
|
|
105
|
105
|
$merdata= [
|
|
106
|
|
- ['className'=> 'el-icon-s-order', 'count'=>$count, 'field'=> '个', 'name'=> '商户总数']
|
|
107
|
|
- ];
|
|
|
106
|
+ ['className'=> 'el-icon-s-order', 'count'=>$count, 'field'=> '个', 'name'=> '商户总数']
|
|
|
107
|
+ ];
|
|
108
|
108
|
return compact('count', 'list','merdata');
|
|
109
|
109
|
}
|
|
110
|
110
|
|
|
|
@@ -318,14 +318,14 @@ class MerchantRepository extends BaseRepository
|
|
318
|
318
|
}
|
|
319
|
319
|
$count = $query->count($this->dao->getPk());
|
|
320
|
320
|
$list = $query->page($page, $limit)->setOption('field', [])
|
|
321
|
|
- ->field('lat,lng,addr,mer_id,mer_banner,mer_name, mark,mer_avatar,product_score,service_score,postage_score,sales,status,create_time,category_id')
|
|
322
|
|
- ->select()
|
|
323
|
|
- ->each(function ($item) {
|
|
324
|
|
- $data = $item->showProduct->toArray();
|
|
325
|
|
- unset($item->showProduct);
|
|
326
|
|
- $recommend = array_slice($data, 0, 3);
|
|
327
|
|
- return $item['recommend'] = $recommend;
|
|
328
|
|
- });
|
|
|
321
|
+ ->field('lat,lng,addr,mer_id,mer_banner,mer_name, mark,mer_avatar,product_score,service_score,postage_score,sales,status,create_time,category_id')
|
|
|
322
|
+ ->select()
|
|
|
323
|
+ ->each(function ($item) {
|
|
|
324
|
+ $data = $item->showProduct->toArray();
|
|
|
325
|
+ unset($item->showProduct);
|
|
|
326
|
+ $recommend = array_slice($data, 0, 3);
|
|
|
327
|
+ return $item['recommend'] = $recommend;
|
|
|
328
|
+ });
|
|
329
|
329
|
|
|
330
|
330
|
|
|
331
|
331
|
return compact('count', 'list');
|
|
|
@@ -371,7 +371,7 @@ class MerchantRepository extends BaseRepository
|
|
371
|
371
|
$merchant['like']=$like;
|
|
372
|
372
|
$merchant['topping']=$topping;
|
|
373
|
373
|
}
|
|
374
|
|
-
|
|
|
374
|
+
|
|
375
|
375
|
// Db::name("merchant")->where("mer_id",$cartInfo['mer_id'])->inc('renqizhi', 1)
|
|
376
|
376
|
$this->dao->addrenqi($id);
|
|
377
|
377
|
if($merchant['content_pic']){
|
|
|
@@ -421,14 +421,14 @@ class MerchantRepository extends BaseRepository
|
|
421
|
421
|
log::info($userInfo);
|
|
422
|
422
|
log::info($type439);
|
|
423
|
423
|
$list=app()->make(ProductRepository::class)->getApiSearch($merId, $where, $page, $limit, $userInfo,$type439);
|
|
424
|
|
-
|
|
|
424
|
+
|
|
425
|
425
|
$arr=[];
|
|
426
|
426
|
foreach ($list["list"] as $v){
|
|
427
|
427
|
$k= app()->make(ProductRepository::class)->pvParm($v['product_id']);
|
|
428
|
428
|
// $v['special_merchant']= merchantConfig($v['mer_id'], 'special_merchant');
|
|
429
|
|
-
|
|
|
429
|
+
|
|
430
|
430
|
log::info("==========yang= {$k['yanglao']} ");
|
|
431
|
|
-
|
|
|
431
|
+
|
|
432
|
432
|
$v['yanglao']='';
|
|
433
|
433
|
$v['pv']='';
|
|
434
|
434
|
$v['jifen']='';
|
|
|
@@ -436,17 +436,21 @@ class MerchantRepository extends BaseRepository
|
|
436
|
436
|
$v['jfduihuan']='';
|
|
437
|
437
|
$v['jdduihuan']='';
|
|
438
|
438
|
//会员专区中VR或者现金和VR+现金形式
|
|
439
|
|
- //支付组合
|
|
|
439
|
+ //支付组合
|
|
440
|
440
|
$v['fzone_paytype'] = '';
|
|
441
|
441
|
//$v['vr'] = 0;
|
|
442
|
442
|
$num_yl = 0;
|
|
443
|
|
-
|
|
|
443
|
+
|
|
444
|
444
|
if($v['price'] == '1180'){
|
|
445
|
445
|
$num_yl = 1000;
|
|
446
|
446
|
}else if($v['price'] == '10620'){
|
|
447
|
447
|
$num_yl = 9000;
|
|
448
|
448
|
}else if($v['price'] == '11800'){
|
|
449
|
449
|
$num_yl = 10000;
|
|
|
450
|
+ }else if($v['price'] == '2360'){
|
|
|
451
|
+ $num_yl = 2000;
|
|
|
452
|
+ }else if($v['price'] == '9440'){
|
|
|
453
|
+ $num_yl = 8000;
|
|
450
|
454
|
}
|
|
451
|
455
|
|
|
452
|
456
|
if($merId == 496){
|
|
|
@@ -455,14 +459,14 @@ class MerchantRepository extends BaseRepository
|
|
455
|
459
|
$v['pv']=$num_yl;
|
|
456
|
460
|
//$v['vr']=$v['price'];
|
|
457
|
461
|
//1:为会员专区,
|
|
458
|
|
-
|
|
|
462
|
+
|
|
459
|
463
|
$v['fzone_paytype']= [
|
|
460
|
464
|
1=>[
|
|
461
|
465
|
1=>$v['price'],//VR
|
|
462
|
466
|
2=>$v['price']//现金
|
|
463
|
467
|
]
|
|
464
|
|
- ];
|
|
465
|
|
-
|
|
|
468
|
+ ];
|
|
|
469
|
+
|
|
466
|
470
|
}else if($merId == 439){
|
|
467
|
471
|
//精彩生活和商贸区
|
|
468
|
472
|
$jf = $v['price'] - round($v['concession_pri']*0.3, 2) . ' + ' . round($v['concession_pri']*0.3, 2);
|
|
|
@@ -476,7 +480,7 @@ class MerchantRepository extends BaseRepository
|
|
476
|
480
|
$v['gongxian'] = round($v['concession_pri'] * 0.35, 2);
|
|
477
|
481
|
}
|
|
478
|
482
|
}
|
|
479
|
|
-
|
|
|
483
|
+
|
|
480
|
484
|
// $v=($v,$k);
|
|
481
|
485
|
// array_push($v,$k);
|
|
482
|
486
|
$arr[]=$v;
|
|
|
@@ -523,7 +527,7 @@ class MerchantRepository extends BaseRepository
|
|
523
|
527
|
$query->with(['merchant'])->with(['issetCoupon']);
|
|
524
|
528
|
$count = $query->count();
|
|
525
|
529
|
// echo DB::getlastsql();die;
|
|
526
|
|
- $filed = 'product_id,mer_id,brand_id,unit_name,rate,reply_count,store_info,cate_id,ficti,image,slider_image,store_name,keyword,sort,is_show,sales,price,refusal,cost,ot_price,stock,is_gift_bag,care_count,status,is_used,create_time,seckill,plate_mer_profit,type';
|
|
|
530
|
+ $filed = 'product_id,mer_id,brand_id,unit_name,rate,reply_count,store_info,cate_id,ficti,image,slider_image,store_name,keyword,sort,is_show,sales,price,refusal,cost,ot_price,stock,is_gift_bag,care_count,status,is_used,create_time,seckill,plate_mer_profit,type';
|
|
527
|
531
|
$list = $query->page($page, $limit)->setOption('field', [])->field($filed)->select();
|
|
528
|
532
|
$ProductRepository=app()->make(ProductRepository::class);
|
|
529
|
533
|
|