客户线索分配
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace app\service;
|
||||
|
||||
use app\model\User;
|
||||
use app\model\UserSn;
|
||||
|
||||
class UserService
|
||||
{
|
||||
/**
|
||||
* 更新用户sn
|
||||
* @param $sn
|
||||
* @param $email
|
||||
*/
|
||||
public static function updateSn($sn, $email)
|
||||
{
|
||||
$user = User::first()
|
||||
->where('email',$email)
|
||||
->first();
|
||||
return $user;
|
||||
if(!$user){
|
||||
return false;
|
||||
}
|
||||
if($user->sn != $sn){
|
||||
UserSn::where(['sn' => $user->sn])->update(['user_id' => 0]);
|
||||
UserSn::where(['sn' => $sn])->update(['user_id' => $user->id]);
|
||||
$user->sn = $sn;
|
||||
$user->save();
|
||||
}
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user