更新市级供应链判断
This commit is contained in:
parent
3c03431cf5
commit
514b2feab1
@ -18,6 +18,7 @@ use app\common\model\store\order\StoreOrderInterest;
|
||||
use app\common\model\store\order\StoreRefundOrder;
|
||||
use app\common\model\store\product\PurchaseRecord;
|
||||
use app\common\model\user\User;
|
||||
use app\common\model\system\merchant\Merchant;
|
||||
use app\common\repositories\BaseRepository;
|
||||
use app\common\repositories\delivery\DeliveryOrderRepository;
|
||||
use app\common\repositories\store\coupon\StoreCouponRepository;
|
||||
@ -2456,9 +2457,11 @@ class StoreOrderRepository extends BaseRepository
|
||||
$mer_cate['level']=1;
|
||||
$mer_cate_id=Db::name('store_category')->insertGetId($mer_cate);
|
||||
}
|
||||
$type=Db::name('merchant')->where('mer_id',$merId)->value('type_id');
|
||||
// $type=Db::name('merchant')->where('mer_id',$merId)->value('type_id');
|
||||
$typeCode=Db::name('merchant_type')->where('mer_type_id',$merId)->value('type_code');
|
||||
$product_type=0;
|
||||
if ($type==12){
|
||||
// if ($type==12){
|
||||
if ($typeCode==Merchant::TypeCode['TypeSupplyChain']){
|
||||
$product_type=98;//供应链
|
||||
}
|
||||
foreach ($data as $datum) {
|
||||
|
@ -60,7 +60,9 @@ class StoreProduct extends BaseController
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where = $this->request->params(['cate_id', 'keyword', ['type',20], 'mer_cate_id', 'is_gift_bag', 'status', 'us_status', 'product_id', 'mer_labels',['order','sort']]);
|
||||
$merchant = app()->make(MerchantRepository::class)->get($merId);
|
||||
if ($merchant['type_id']==12){
|
||||
$typeCode=Db::name('merchant_type')->where('mer_type_id',$merchant['type_id'])->value('type_code');
|
||||
// if ($merchant['type_id']==12){
|
||||
if ($typeCode==Merchant::TypeCode['TypeSupplyChain']){
|
||||
$product_type=98;//供应链
|
||||
}else{
|
||||
$product_type=0;//普通商品
|
||||
@ -87,7 +89,9 @@ class StoreProduct extends BaseController
|
||||
$data['status'] = $merchant->is_audit ? 0 : 1;
|
||||
$data['mer_status'] = ($merchant['is_del'] || !$merchant['mer_state'] || !$merchant['status']) ? 0 : 1;
|
||||
$data['rate'] = 3;
|
||||
if ($merchant['type_id']==12){
|
||||
$typeCode=Db::name('merchant_type')->where('mer_type_id',$merchant['type_id'])->value('type_code');
|
||||
// if ($merchant['type_id']==12){
|
||||
if ($typeCode==Merchant::TypeCode['TypeSupplyChain']){
|
||||
$product_type=98;//供应链
|
||||
}else{
|
||||
$product_type=0;//普通商品
|
||||
|
@ -52,7 +52,10 @@ class Product extends BaseController
|
||||
$where = $this->request->params(['temp_id','cate_id','keyword',['type',1],'mer_cate_id','is_gift_bag','status','us_status','product_id','mer_labels',['order','sort'],'is_ficti','svip_price_type']);
|
||||
$where = array_merge($where,$this->repository->switchType($where['type'],$this->request->merId(),0));
|
||||
$type=$this->request->merchant()['type_id'];
|
||||
if ($type==12){
|
||||
$typeCode=Db::name('merchant_type')->where('mer_type_id',$type)->value('type_code');
|
||||
$product_type=0;
|
||||
// if ($type==12){
|
||||
if ($typeCode==Merchant::TypeCode['TypeSupplyChain']){
|
||||
$where['product_type']=98;//供应链
|
||||
}
|
||||
return app('json')->success($this->repository->getList($this->request->merId(),$where, $page, $limit));
|
||||
@ -87,7 +90,9 @@ class Product extends BaseController
|
||||
$data['status'] = $this->request->merchant()->is_audit ? 0 : 1;
|
||||
$data['mer_status'] = ($this->request->merchant()->is_del || !$this->request->merchant()->mer_state || !$this->request->merchant()->status) ? 0 : 1;
|
||||
$data['rate'] = 3;
|
||||
if ($this->request->merchant()->type_id==12){
|
||||
$typeCode=Db::name('merchant_type')->where('mer_type_id',$this->request->merchant()->type_id)->value('type_code');
|
||||
// if ($this->request->merchant()->type_id==12){
|
||||
if ($typeCode==Merchant::TypeCode['TypeSupplyChain']){
|
||||
$product_type=98;//供应链
|
||||
}else{
|
||||
$product_type=0;//普通商品
|
||||
@ -164,7 +169,9 @@ class Product extends BaseController
|
||||
{
|
||||
$type=$this->request->merchant()['type_id'];
|
||||
$product_type=0;
|
||||
if ($type==12){
|
||||
$typeCode=Db::name('merchant_type')->where('mer_type_id',$type)->value('type_code');
|
||||
// if ($type==12){
|
||||
if ($typeCode==Merchant::TypeCode['TypeSupplyChain']){
|
||||
$product_type=98;//供应链
|
||||
}
|
||||
return app('json')->success($this->repository->getFilter($this->request->merId(),'商品',$product_type));
|
||||
|
Loading…
x
Reference in New Issue
Block a user