|
@@ -301,12 +301,11 @@ class MemberService
|
|
|
if(!empty($item['join_pay_order_id'])){
|
|
|
$orderIds = Order::where('order_groupby', $item['join_pay_order_id'])->pluck('order_id');
|
|
|
$goodsIds = OrderSheet::whereIn('join_sheet_order_id', $orderIds)->pluck('join_sheet_goods_id');
|
|
|
- $categoryIds = Goods::whereIn('goods_id', $goodsIds)->pluck('join_goods_category_id')->toArray();
|
|
|
+ $categoryIds = Goods::whereIn('goods_id', $goodsIds)->pluck('join_goods_category_id');
|
|
|
}
|
|
|
|
|
|
|
|
|
$categoryName = [];
|
|
|
- $categoryIds = array_unique($categoryIds);
|
|
|
foreach ($categoryIds as $id) {
|
|
|
$category = SysCategory::where('category_id', $id)->first();
|
|
|
if (!empty($category->category_super_path)) {
|
|
@@ -317,7 +316,7 @@ class MemberService
|
|
|
$categoryName[] = $category->category_name;
|
|
|
}
|
|
|
}
|
|
|
- $item['goods_category'] = implode(',', $categoryName);
|
|
|
+ $item['goods_category'] = implode(',', array_unique($categoryName));
|
|
|
|
|
|
if (in_array($item['pay_category'], ['RECHARGE', 'REFUND'])) {
|
|
|
$item['balance_type'] = 'add';
|