使用fdesk库

This commit is contained in:
2025-07-23 16:55:18 +08:00
parent fa4ade4b35
commit ef66ecbbef
13 changed files with 71 additions and 39 deletions
+4 -3
View File
@@ -17,7 +17,7 @@ class Customer extends Model
*
* @var string
*/
protected $table = 'customer';
protected $table = 'crm_customer';
/**
* The primary key associated with the table.
@@ -67,7 +67,8 @@ class Customer extends Model
*/
public static function getCustomer($customer, $request, $tag = false)
{
$language = $request->user['language'] ?: 'en';
//$language = $request->user['language'] ?: 'en';
$language = 'zh_CN';
$customer['grade_txt'] = Util::language($language, Constants::GRADE_EN[$customer['grade']], Constants::GRADE[$customer['grade']], Constants::GRADE_RU[$customer['grade']]);
$customer['magnitude_txt'] = Util::language($language, Constants::MAGNITUDE_EN[$customer['magnitude']], Constants::MAGNITUDE[$customer['magnitude']], Constants::MAGNITUDE_RU[$customer['magnitude']]);
$customer['sex_txt'] = Util::language($language, Constants::SEX_EN[$customer['sex']], Constants::SEX[$customer['sex']], Constants::SEX_RU[$customer['sex']]);
@@ -118,7 +119,7 @@ class Customer extends Model
*/
public function tags()
{
return $this->belongsToMany(Tag::class, 'customer_tag', 'customer_id', 'tag_id')
return $this->belongsToMany(Tag::class, 'crm_customer_tag', 'customer_id', 'tag_id')
->withTimestamps(); // 如果需要记录关联时间
}