港口场景筛选
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\BaseController;
|
||||
use app\common\model\Country;
|
||||
use app\common\traits\crud\CrudControllerTrait;
|
||||
use app\admin\service\SysCurrencyService;
|
||||
|
||||
@@ -30,6 +31,11 @@ class SysCurrencyController extends BaseController
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
||||
if (isset($data['last_updated']))
|
||||
$data['last_updated'] = date('Y-m-d H:i:s', $data['last_updated']);
|
||||
if (isset($data['country_id'])){
|
||||
$data['country_name'] = Country::where('id',$data['country_id'])->value('item_label');
|
||||
} else {
|
||||
$data['country_name'] = '';
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -47,6 +53,11 @@ class SysCurrencyController extends BaseController
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
||||
if (isset($data['last_updated']))
|
||||
$data['last_updated'] = date('Y-m-d H:i:s', $data['last_updated']);
|
||||
if (isset($data['country_id'])){
|
||||
$data['country_name'] = Country::where('id',$data['country_id'])->value('item_label');
|
||||
} else {
|
||||
$data['country_name'] = '';
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,14 @@ class SysPortService
|
||||
$config['orWhere'][] = [$col, 'like', $k];
|
||||
}
|
||||
}
|
||||
// 场景
|
||||
if (isset($p['scene']) && $p['scene']) {
|
||||
if($p['country_id'] == 'domestic'){
|
||||
$config['where']['country_id'] = 45;
|
||||
}else{
|
||||
$config['where']['country_id'] = ['<>', 45];
|
||||
}
|
||||
}
|
||||
//$config['where']['status'] = 1;
|
||||
break;
|
||||
case 'show':
|
||||
|
||||
Reference in New Issue
Block a user