1
This commit is contained in:
@@ -299,16 +299,17 @@ class EmailClient extends Base
|
||||
$expert = Db::name('expert')->where('expert_id', $expertId)->find();
|
||||
if (!$expert) {
|
||||
return jsonError('expert not found');
|
||||
}
|
||||
if (empty($expert['field'])) {
|
||||
$fieldRow = Db::name('expert_field')
|
||||
->where('expert_id', $expertId)
|
||||
->where('state', 0)
|
||||
->order('expert_field_id asc')
|
||||
->find();
|
||||
if ($fieldRow) {
|
||||
$expert['field'] = $fieldRow['field'];
|
||||
}else{
|
||||
$expert_fields = Db::name('expert_fields')->where('expert_id', $expert['expert_id'])->select();
|
||||
$field_str = '';
|
||||
foreach ($expert_fields as $field){
|
||||
if($field_str != ''){
|
||||
$field_str .= ','.$field['field_name'];
|
||||
}else{
|
||||
$field_str = $field['field_name'];
|
||||
}
|
||||
}
|
||||
$expert['fields'] = $field_str;
|
||||
}
|
||||
$expertVars = $service->buildExpertVars($expert);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user