添加商品返补比例设置
This commit is contained in:
parent
a20a79d60f
commit
69f32edab2
@ -226,31 +226,30 @@ class LocalStoreGoodsLogic extends Logic
|
|||||||
'audit_status' => $get['audit_status']
|
'audit_status' => $get['audit_status']
|
||||||
])->find();
|
])->find();
|
||||||
|
|
||||||
$model = new GoodsSubsidy();
|
if ($data) {
|
||||||
$data['subsidy'] = $model->getSubsidyById($data['subsidy_id'] > 0 ? $data['subsidy_id'] : 4);
|
$model = new GoodsSubsidy();
|
||||||
|
$data['subsidy'] = $model->getSubsidyById($data['subsidy_id'] > 0 ? $data['subsidy_id'] : 4);
|
||||||
|
|
||||||
// 查找多规格
|
// 查找多规格
|
||||||
if ($data['is_multiple_spec'] == 1) {
|
if ($data['is_multiple_spec'] == 1) {
|
||||||
$data['item'] = LocalStoreGoodsItem::where([
|
$data['item'] = LocalStoreGoodsItem::where([
|
||||||
'goods_id' => $get['id']
|
'goods_id' => $get['id']
|
||||||
])->field('id, image, spec_value_ids, spec_value_str, price, stock, note')->select();
|
])->field('id, image, spec_value_ids, spec_value_str, price, stock, note')->select();
|
||||||
|
|
||||||
foreach ($data['item'] as &$v) {
|
foreach ($data['item'] as &$v) {
|
||||||
$v['image'] = Config::get('aliyunoss.domain') . $v['image'];
|
$v['image'] = Config::get('aliyunoss.domain') . $v['image'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['spec'] = LocalStoreGoodsSpec::with('item')->where([
|
$data['spec'] = LocalStoreGoodsSpec::with('item')->where([
|
||||||
'goods_id' => $get['id']
|
'goods_id' => $get['id']
|
||||||
])->field('id, name')->select();
|
])->field('id, name')->select();
|
||||||
|
|
||||||
foreach ($data['spec'] as &$v1) {
|
foreach ($data['spec'] as &$v1) {
|
||||||
foreach ($v1['item'] as $key => &$v2) {
|
foreach ($v1['item'] as $key => &$v2) {
|
||||||
$v1['item'][$key] = $v2['value'];
|
$v1['item'][$key] = $v2['value'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($data) {
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user