小程序当前已通过认证人数修改 #5

Merged
liuqing merged 1 commits from zzzyh into fxshop 3 months ago
  1. 7
      app/api/controller/Invite.php
  2. 2
      app/api/controller/Store.php

@ -97,6 +97,7 @@ class Invite extends Controller
$data['adoption_num'] = 0;
$data['refuse_num'] = 0;
$model = new InviteLog();
$storeId = $this->storeId;
$user_ids = $model->inviteeUserIds();
$status = intval($this->request->post('status'));
if (!$status) {
@ -117,8 +118,12 @@ class Invite extends Controller
}
$data['list'] = $list->items();
$data['total'] = $list->total();
//1.查询需要的邀请人数是多少
$setting = Setting::where(['key'=>'condition'])->field('values')->find();
$setting = json_decode($setting,true);
$invite_num = $setting['values']['invite_num'] ?? 10;
//审核通过
$data['adoption_num'] = $applyModel->whereIn('user_id', $user_ids)->where(['status' => WholesalerEnum::ADOPT])->count();
$data['adoption_num'] = ($applyModel->whereIn('user_id', $user_ids)->where(['status' => WholesalerEnum::ADOPT])->count()).'/'.$invite_num;
//审核拒绝
$data['refuse_num'] = $applyModel->whereIn('user_id', $user_ids)->where(['status' => WholesalerEnum::REFUSE])->count();
}

@ -222,7 +222,7 @@ class Store extends Controller
$page = $this->request->param('page') ?? 1;
$servers = new successful();
//$list = $servers->list($page);
$list = successful:: withoutGlobalScope()->where('status',10)->order('sort','asc')->paginate(10, false, $page);
$list = successful::where('status',10)->order('sort','asc')->paginate(10, false, $page);
$list->each(function ($item, $key) {
$imageUrl = UploadFile::withoutGlobalScope()->where('file_id', $item['image_id'])->find();
if ($imageUrl) {

Loading…
Cancel
Save