From f2a5f5bece6843c1463f1613d3e23ae491622257 Mon Sep 17 00:00:00 2001 From: limu Date: Mon, 25 Dec 2023 10:50:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AB=99=E4=BD=8D=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/user/UserPartnerRepository.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/common/repositories/user/UserPartnerRepository.php b/app/common/repositories/user/UserPartnerRepository.php index cb9d52a..5f2779d 100644 --- a/app/common/repositories/user/UserPartnerRepository.php +++ b/app/common/repositories/user/UserPartnerRepository.php @@ -73,17 +73,16 @@ class UserPartnerRepository extends BaseRepository public function changePartnerForm($uid) { /** @var UserLabelRepository $make */ - $list = $this->dao->getAll($uid)->column('partner_id') ?? []; + $list = UserPartner::getDB()->where('uid',$uid)->column('id') ?? []; $data = ['partner_id' => $list, 'uid' => $uid]; $url = 'sys/user/partner/' . $uid; $res = Elm::createForm($url, [ Elm::input('uid', '用户 ID', '')->disabled(true)->required(true), Elm::selectMultiple('partner_id', '用户合作人角色')->options(function () { - $partnerForm = new PartnerDao(); - $data = $partnerForm->getAll(); + $data = UserPartner::getDB()->select()->toArray(); foreach ($data as $value => $label) { $name = (string)$label['id']; - $value = $label['name']; + $value = $label['partner_name']; $options[] = compact('value', 'name'); } return $options;