更新调货详情
This commit is contained in:
parent
55fc4563a8
commit
3f72452680
@ -264,9 +264,9 @@ class CommunityRepository extends BaseRepository
|
|||||||
$query->where('left_id', $user->uid ?? '');
|
$query->where('left_id', $user->uid ?? '');
|
||||||
},
|
},
|
||||||
'resale' => [
|
'resale' => [
|
||||||
'spu' => function ($query) {
|
// 'spu' => function ($query) {
|
||||||
$query->field('spu_id,store_name,image,price,product_type,activity_id,product_id');
|
// $query->field('spu_id,store_name,image,price,product_type,activity_id,product_id');
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
])->hidden(['is_del'])->find();
|
])->hidden(['is_del'])->find();
|
||||||
|
|
||||||
@ -285,7 +285,9 @@ class CommunityRepository extends BaseRepository
|
|||||||
$data['total_price'] = '0';
|
$data['total_price'] = '0';
|
||||||
foreach ($data['resale'] as $k=>$value) {
|
foreach ($data['resale'] as $k=>$value) {
|
||||||
$data['total_price'] = bcadd($data['total_price'], bcmul($value['price'], $value['number'], 2), 2);
|
$data['total_price'] = bcadd($data['total_price'], bcmul($value['price'], $value['number'], 2), 2);
|
||||||
$data['resale'][$k]['attr'] = '123';
|
$data['resale'][$k]['attr'] = [];
|
||||||
|
$attrInfo = Db::name('StoreProduct')->alias('sp')->leftJoin('StoreProductAttrValue sv','sp.product_id = sv.product_id')->where('sv.unique', $value['product_attr_unique'])->field('sv.detail, sv.sku, sv.stock, sv.sales, sp.image')->find();
|
||||||
|
$data['resale'][$k]['attr'] = $attrInfo;
|
||||||
}
|
}
|
||||||
$data['mer_avatar'] = '';
|
$data['mer_avatar'] = '';
|
||||||
$data['mer_name'] = '';
|
$data['mer_name'] = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user