|
@@ -65,12 +65,12 @@ class PromotionController extends CatchController
|
|
$payTemplates = DB::table('pay_templates')->whereIn('id', $chargeTemplateIds)
|
|
$payTemplates = DB::table('pay_templates')->whereIn('id', $chargeTemplateIds)
|
|
->select('id', 'name')
|
|
->select('id', 'name')
|
|
->get()->keyBy('id')->toArray();
|
|
->get()->keyBy('id')->toArray();
|
|
- $yinliuGzhids = $result->pluck('yinliu_gzhid')->diff([0]);
|
|
|
|
|
|
+ $yinliuIds = $result->pluck('yinliu_id')->diff([0]);
|
|
|
|
|
|
- $gzhs = $yinliuGzhids->isEmpty() ? collect() :
|
|
|
|
- DB::table('wechat_authorization_infos')
|
|
|
|
- ->whereIn('id', $yinliuGzhids)
|
|
|
|
- ->select('id', 'nick_name')->get()->keyBy('id');
|
|
|
|
|
|
+ $yinlius = $yinliuIds->isEmpty() ? collect() :
|
|
|
|
+ DB::table('yinliu_gzh_config')
|
|
|
|
+ ->whereIn('id', $yinliuIds)
|
|
|
|
+ ->select('id', 'name')->get()->keyBy('id');
|
|
|
|
|
|
foreach ($result as $item) {
|
|
foreach ($result as $item) {
|
|
$item->status_str = $item->status ? '启用':'禁用';
|
|
$item->status_str = $item->status ? '启用':'禁用';
|
|
@@ -84,7 +84,7 @@ class PromotionController extends CatchController
|
|
$item->first_charge_template_str = $payTemplates[$item->first_charge_template_id]->name ?? '';
|
|
$item->first_charge_template_str = $payTemplates[$item->first_charge_template_id]->name ?? '';
|
|
$item->not_first_charge_template_str = $payTemplates[$item->not_first_charge_template_id]->name ?? '';
|
|
$item->not_first_charge_template_str = $payTemplates[$item->not_first_charge_template_id]->name ?? '';
|
|
$item->yinliu_type_str = 1 == $item->yinliu_type ? '公众号引流' : '';
|
|
$item->yinliu_type_str = 1 == $item->yinliu_type ? '公众号引流' : '';
|
|
- $item->yinliu_gzhid_str = $gzhs->get($item->yinliu_gzhid)->nick_name ?? '';
|
|
|
|
|
|
+ $item->yinliu_config_str = $yinlius->get($item->yinliu_id)->name ?? '';
|
|
}
|
|
}
|
|
return $result;
|
|
return $result;
|
|
|
|
|