commit
1a31a072e7
@ -751,8 +751,10 @@ class ProductRepository extends BaseRepository
|
||||
$data['attrValue'] = $arr;
|
||||
|
||||
$content = $data['content']['content'] ?? '';
|
||||
$data['content_arr'] = [];
|
||||
if (isset($data['content']) &&$data['content']['type']==1){
|
||||
$arr = json_decode($content);
|
||||
$data['content_arr'] = $arr;
|
||||
if($arr){
|
||||
$content='';
|
||||
foreach($arr->image as $k=>$v){
|
||||
|
@ -98,7 +98,7 @@ class Product extends BaseController
|
||||
$product_type=0;//普通商品
|
||||
}
|
||||
$data['update_time'] = date('Y-m-d H:i:s');
|
||||
$this->repository->create($data,$product_type);
|
||||
$this->repository->create($data,$product_type,1);
|
||||
return app('json')->success('添加成功');
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ class Product extends BaseController
|
||||
$data['update_time'] = date('Y-m-d H:i:s');
|
||||
$typeSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeSupplyChain'])->value('mer_type_id');
|
||||
$productType = $this->request->merchant()->type_id == $typeSupplyChainId ? 98 : 0;
|
||||
$this->repository->edit($id, $data, $this->request->merId(), $productType);
|
||||
$this->repository->edit($id, $data, $this->request->merId(), $productType,1);
|
||||
return app('json')->success('编辑成功');
|
||||
}
|
||||
|
||||
@ -280,8 +280,8 @@ class Product extends BaseController
|
||||
'spec_type'
|
||||
];
|
||||
$data = $this->request->params($params);
|
||||
$count = app()->make(StoreCategoryRepository::class)->getWhereCount(['store_category_id' => $data['mer_cate_id'],'is_show' => 1,'mer_id' => $this->request->merId()]);
|
||||
if (!$count) throw new ValidateException('商户分类不存在或不可用');
|
||||
// $count = app()->make(StoreCategoryRepository::class)->getWhereCount(['store_category_id' => $data['mer_cate_id'],'is_show' => 1,'mer_id' => $this->request->merId()]);
|
||||
// if (!$count) throw new ValidateException('商户分类不存在或不可用');
|
||||
$data['status'] = 1;
|
||||
$this->repository->freeTrial($id, $data,$this->request->merId());
|
||||
return app('json')->success('编辑成功');
|
||||
|
Loading…
x
Reference in New Issue
Block a user