1. 推广员用户挂号

This commit is contained in:
李琦
2026-06-15 16:20:02 +08:00
parent bede28aced
commit 5f5ef87b44
6 changed files with 126 additions and 87 deletions

View File

@@ -5,6 +5,7 @@ namespace service\modules\v1\controllers;
use common\core\BaseAppController;
use common\enums\RegisterEnum;
use common\helpers\FuncHelper;
use common\models\newDb\ClinicSalespersonModel;
use common\models\oldDb\Register;
use common\models\oldDb\UserPatientCase;
use common\services\ExportService;
@@ -188,13 +189,12 @@ class RegisterController extends BaseAppController
if (!$m->hasAttribute('salesperson_id') || (int) $m->salesperson_id <= 0) {
return '';
}
$row = (new \yii\db\Query())
->select(['nick_name', 'phone'])
->from('xk_salesperson')
->where(['id' => (int) $m->salesperson_id])
->one();
$sp = ClinicSalespersonModel::findOne((int) $m->salesperson_id);
if (!$sp) {
return '';
}
return (string) ($row['nick_name'] ?? $row['phone'] ?? '');
return (string) ($sp->nick_name ?? $sp->phone ?? '');
},
]
];