1
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\api\controller;
|
||||
|
||||
use think\Cache;
|
||||
use think\Db;
|
||||
use think\Queue;
|
||||
use think\Validate;
|
||||
use app\common\ExpertFinderService;
|
||||
|
||||
@@ -65,6 +66,15 @@ class ExpertFinder extends Base
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$data1 = [
|
||||
'expert_id' => intval($data['expert_id']),
|
||||
'affiliation' => trim((string)$data['aff']),
|
||||
];
|
||||
|
||||
// Queue::push('app\api\job\FillExpertCountry@fire', $data1, 'FetchExpertCity');
|
||||
|
||||
|
||||
|
||||
$service = new ExpertFinderService();
|
||||
$service->fillExpertCountry($data['expert_id'], $data['aff']);
|
||||
$expert = Db::name('expert')->where('expert_id', intval($data['expert_id']))->find();
|
||||
@@ -85,11 +95,7 @@ class ExpertFinder extends Base
|
||||
|
||||
$pending = Db::name('expert')
|
||||
->where('affiliation', '<>', '')
|
||||
->where(function ($q) {
|
||||
$q->where('country_id', 0)
|
||||
->whereOr('country_id', 'null')
|
||||
->whereOr('country', '');
|
||||
})
|
||||
->where('country_id', 0)
|
||||
->where('state', '<>', 5)
|
||||
->count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user