|
|
|
@ -78,4 +78,37 @@ class Invite extends Controller |
|
|
|
|
$data = compact('refuse_num', 'adoption_num', 'money'); |
|
|
|
|
return $this->renderSuccess($data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @notes:邀请采购商列表 |
|
|
|
|
* @return Json |
|
|
|
|
* @throws BaseException |
|
|
|
|
* @throws DbException |
|
|
|
|
* @author: wanghousheng |
|
|
|
|
*/ |
|
|
|
|
public function inviteWholesalerList(): Json |
|
|
|
|
{ |
|
|
|
|
$data['list'] = []; |
|
|
|
|
$data['total'] = 0; |
|
|
|
|
$model = new InviteLog(); |
|
|
|
|
$user_ids = $model->inviteeUserIds(); |
|
|
|
|
$status = intval($this->request->post('status', 10)); |
|
|
|
|
if ($user_ids) { |
|
|
|
|
$applyModel = new Apply(); |
|
|
|
|
$list = $applyModel->whereIn('user_id', $user_ids) |
|
|
|
|
->with(['avatarImg']) |
|
|
|
|
->where(['status' => $status]) |
|
|
|
|
->field(['username', 'mobile', 'avatar_id', 'create_time']) |
|
|
|
|
->order('id desc') |
|
|
|
|
->paginate(15); |
|
|
|
|
$data['list'] = $list->items(); |
|
|
|
|
if (!empty($data['list'])) { |
|
|
|
|
foreach ($data['list'] as &$item) { |
|
|
|
|
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$data['total'] = $list->total(); |
|
|
|
|
} |
|
|
|
|
return $this->renderSuccess($data); |
|
|
|
|
} |
|
|
|
|
} |