使用fdesk库
This commit is contained in:
@@ -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(); // 如果需要记录关联时间
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class CustomerHis extends Model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'customer_his';
|
||||
protected $table = 'crm_customer_his';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
|
||||
@@ -14,7 +14,7 @@ class CustomerTag extends Model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'customer_tag';
|
||||
protected $table = 'crm_customer_tag';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
|
||||
@@ -16,7 +16,7 @@ class Follow extends Model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'follow';
|
||||
protected $table = 'crm_follow';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
@@ -57,8 +57,8 @@ class Follow extends Model
|
||||
}else {
|
||||
$follow['oss_picture'] = '';
|
||||
}
|
||||
$follow['created_at'] = date('Y-m-d H:i:s',strtotime($follow['created_at'])+(3600*8));
|
||||
$follow['updated_at'] = date('Y-m-d H:i:s',strtotime($follow['updated_at'])+(3600*8));
|
||||
$follow['created_at'] = (!empty($follow['created_at']))?date('Y-m-d H:i:s',strtotime($follow['created_at'])+(3600*8)):'';
|
||||
$follow['updated_at'] = (!empty($follow['updated_at']))?date('Y-m-d H:i:s',strtotime($follow['updated_at'])+(3600*8)):'';
|
||||
// $follow = Util::formatDate($follow);
|
||||
return $follow;
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class Tag extends Model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'tag';
|
||||
protected $table = 'crm_tag';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
|
||||
@@ -17,7 +17,7 @@ class TagGroup extends Model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'tag_group';
|
||||
protected $table = 'crm_tag_group';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
|
||||
Reference in New Issue
Block a user