修改商品批发价
This commit is contained in:
parent
776c662b69
commit
475453cfe9
@ -66,7 +66,7 @@ class ProductRepository extends BaseRepository
|
||||
public $saleType;
|
||||
protected $dao;
|
||||
const CREATE_PARAMS = [
|
||||
"is_copy", "image", "slider_image", "store_name", "store_info", "keyword", "bar_code", "guarantee_template_id", "cate_id", "unit_name", "sort", "is_show", "is_good", 'is_gift_bag', 'integral_rate', "video_link", "temp_id", "content", "spec_type", "extension_type", "attr", 'mer_labels', 'delivery_way', 'delivery_free', 'param_temp_id', 'extend', 'mer_form_id',
|
||||
"is_copy", "image", "slider_image", "store_name", "store_info", "keyword", "bar_code", "guarantee_template_id", "cate_id", "unit_name", "sort", "is_show", "is_good", 'is_gift_bag', 'integral_rate', "video_link", "temp_id", "content", "spec_type", "extension_type", "attr", 'mer_labels', 'delivery_way', 'delivery_free', 'param_temp_id', 'extend', 'mer_form_id','wholesale_price',
|
||||
["mer_cate_id", []],
|
||||
['refund_switch', 1],
|
||||
["brand_id", 0],
|
||||
@ -235,8 +235,10 @@ class ProductRepository extends BaseRepository
|
||||
$admin_info = $data['admin_info'] ?? [];
|
||||
unset($data['admin_info']);
|
||||
}
|
||||
|
||||
// dump($data);
|
||||
$product = $this->setProduct($data);
|
||||
$product['wholesale_price'] = 11;
|
||||
// halt($product);
|
||||
event('product.create.before', compact('data', 'productType', 'conType'));
|
||||
return Db::transaction(function () use ($data, $productType, $conType, $content, $product, $admin_info) {
|
||||
$activity_id = 0;
|
||||
@ -305,6 +307,7 @@ class ProductRepository extends BaseRepository
|
||||
$product['admin_info'] = $data['admin_info'];
|
||||
unset($data['admin_info']);
|
||||
}
|
||||
|
||||
return Db::transaction(function () use ($id, $data, $productType, $settleParams, $content, $product, $spuData, $merId) {
|
||||
$productData = $this->save($id, $settleParams, $content, $product, $productType);
|
||||
if ($productType == 1) { //秒杀商品
|
||||
@ -527,6 +530,7 @@ class ProductRepository extends BaseRepository
|
||||
'refund_switch' => $data['refund_switch'] ?? 0,
|
||||
'mer_form_id' => $data['mer_form_id'] ?? 0,
|
||||
'rate' => $data['rate'] ?? 5.0,
|
||||
'wholesale_price'=>$data['wholesale_price'] ??0
|
||||
];
|
||||
if (isset($data['extend']))
|
||||
$result['extend'] = $data['extend'] ? json_encode($data['extend'], JSON_UNESCAPED_UNICODE) : '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user