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