From 8cee9fa81bc900334e8cd4d6a27fa07019a41856 Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Mon, 24 Mar 2025 14:32:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=82=AE=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/MailService.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/service/MailService.php b/app/service/MailService.php index 4a0f616..244fcb1 100644 --- a/app/service/MailService.php +++ b/app/service/MailService.php @@ -19,15 +19,18 @@ class MailService { // SMTP 配置 $this->mailer->isSMTP(); - $this->mailer->Host = 'smtp.gmail.com'; -// $this->mailer->Host = 'smtp.qq.com'; +// $this->mailer->Host = 'smtp.gmail.com'; + $this->mailer->Host = 'smtp.feishu.cn'; $this->mailer->SMTPAuth = true; // $this->mailer->Username = 'xinyouhe25@gmail.com'; // 替换为你的 Gmail // $this->mailer->Password = 'zhjkkaplncykzymo'; // 替换为应用专用密码 - $this->mailer->Username = 'linyang0618@gmail.com'; // 替换为你的 Gmail - $this->mailer->Password = 'mrjefuahbwbpqakb'; // 替换为应用专用密码 +// $this->mailer->Username = 'linyang0618@gmail.com'; // 替换为你的 Gmail +// $this->mailer->Password = 'mrjefuahbwbpqakb'; // 替换为应用专用密码 + + $this->mailer->Username = 'app@hnxinyouhe.com'; // 替换为你的 Gmail + $this->mailer->Password = 'akyIUFJ6ihGGjI5h'; // 替换为应用专用密码 // $this->mailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // 使用 TLS $this->mailer->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // SSL 加密 // $this->mailer->Port = 587; From 1773ab9863f865cacfdfe4a4a767bbaf788d403d Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Mon, 24 Mar 2025 15:22:13 +0800 Subject: [PATCH 2/5] sn --- app/controller/UserController.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/controller/UserController.php b/app/controller/UserController.php index e8f423e..e225579 100644 --- a/app/controller/UserController.php +++ b/app/controller/UserController.php @@ -5,6 +5,7 @@ namespace app\controller; use app\model\Country; use app\model\FeishuUser; use app\model\User; +use app\model\UserSn; use app\service\MailService; use app\util\JwtUtil; use app\util\Util; @@ -153,12 +154,20 @@ class UserController 'role' => 1, 'password' => $hashedPassword, 'status' => 0, - 'avatar' => 'vehicle_album/20250322/175585eeebcf44e8c2a2d50a5e8b5388_67ded58ca1011.jpg', - 'sn' => substr(uniqid(), -8) + 'avatar' => 'lingke_crm/lingke.png' ]; + if (Util::isEmpty($id)) { + // 获取编号 + $userSnModel = new UserSn(); + $sn = $userSnModel->where('user_id', '=', 0)->inRandomOrder()->first(); + if (!$sn) { + throw new BusinessException('未找到适用编号'); + } + $data['sn'] = $sn['user_sn']; $res = User::create($data); + UserSn::where(['user_sn'=>$data['sn']])->update(['user_id'=>$res['id']]); } else { $res = User::where('id', $id) ->update($data); From fc6e7c2063b6ddfbfec3964c3503da52537c4ec5 Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Mon, 24 Mar 2025 15:24:51 +0800 Subject: [PATCH 3/5] 1 --- app/model/UserSn.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/model/UserSn.php diff --git a/app/model/UserSn.php b/app/model/UserSn.php new file mode 100644 index 0000000..dd7c55e --- /dev/null +++ b/app/model/UserSn.php @@ -0,0 +1,27 @@ + Date: Tue, 25 Mar 2025 09:03:38 +0800 Subject: [PATCH 4/5] =?UTF-8?q?oss=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/OssService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/OssService.php b/app/service/OssService.php index 5e73783..2096240 100644 --- a/app/service/OssService.php +++ b/app/service/OssService.php @@ -17,7 +17,7 @@ class OssService { $this->accessKeyId = 'LTAI5tAGiH7bkVkmrniXnfkA'; $this->accessKeySecret = 'nqklJBft6t3S0A4ZvxF4ci9ni91kmm'; - $this->bucket = 'vehicle-album'; + $this->bucket = 'lingke_crm'; $this->endpoint = 'https://oss-cn-beijing.aliyuncs.com'; $this->ossClient = new OssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint); } From d511b2fdb51342cb92bdc9936d6f371153551ef6 Mon Sep 17 00:00:00 2001 From: ylyg5690 Date: Wed, 26 Mar 2025 09:56:52 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/UserController.php b/app/controller/UserController.php index e225579..a1fb4ff 100644 --- a/app/controller/UserController.php +++ b/app/controller/UserController.php @@ -154,7 +154,7 @@ class UserController 'role' => 1, 'password' => $hashedPassword, 'status' => 0, - 'avatar' => 'lingke_crm/lingke.png' + 'avatar' => 'lingke_crm/logo.png' ];