Merge branch 'develop' into feature/mzl_dev
This commit is contained in:
@@ -87,13 +87,21 @@ class AuthLogic
|
||||
try {
|
||||
$phone = $this->sanitizePhone($feishuUserInfo['mobile'] ?? '');
|
||||
$email = $feishuUserInfo['enterprise_email'];
|
||||
$user = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||
->where(function($query) use ($phone, $email) {
|
||||
$query->where('phone', $phone)
|
||||
->orWhere('email', $email);
|
||||
})
|
||||
->first();
|
||||
|
||||
// $user = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||
// ->where(function($query) use ($phone, $email) {
|
||||
// $query->where('phone', $phone)
|
||||
// ->orWhere('email', $email);
|
||||
// })
|
||||
// ->first();
|
||||
$userByPhone = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||
->where('phone', $phone)
|
||||
->where('phone', '!=', '')
|
||||
->first();
|
||||
$userByEmail = User::where('corp_id', $feishuUserInfo['corp_id'])
|
||||
->where('email', $email)
|
||||
->where('email', '!=', '')
|
||||
->first();
|
||||
$user = $userByPhone ?: $userByEmail;
|
||||
if (!$user) {
|
||||
// 获取编号
|
||||
$userSn = $this->getAvailableUserSn();
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use support\Model;
|
||||
|
||||
class CustomerAudit extends Model
|
||||
{
|
||||
/**
|
||||
* The connection name for the model.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $connection = 'mysql';
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'crm_customer_audit';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
/**
|
||||
* Indicates if the model should be timestamped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
|
||||
protected $dateFormat = 'U';
|
||||
|
||||
/**
|
||||
* 允许自动填充模型字段
|
||||
*/
|
||||
protected $fillable = ['id', 'customer_id', 'remark', 'img', 'audit', 'report_user_id', 'audit_user_id', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* 不允许自动填充模型字段
|
||||
*/
|
||||
protected $guarded = [];
|
||||
}
|
||||
@@ -80,6 +80,7 @@
|
||||
<li>工单编号:{{code}}</li>
|
||||
<li>工单分类:{{category}}</li>
|
||||
<li>问题描述:{{content}}</li>
|
||||
{{reply}}
|
||||
</ul>
|
||||
|
||||
<p>请点击下方按钮立即查看详情:</p>
|
||||
|
||||
Reference in New Issue
Block a user