fix:前台一级类目,客户代码块获取接口修改
This commit is contained in:
parent
d62043cd62
commit
3ab57b9355
@ -35,12 +35,14 @@ class CodeModuleCategory extends BaseController
|
||||
$con = [
|
||||
'a.code_module_category_library_type' => [ModelCodeModuleCategory::LIBRARY_DEFAULT, ModelCodeModuleCategory::LIBRARY_COMMON]
|
||||
];
|
||||
|
||||
//请求传入客户guid时则只查该客户的私有库
|
||||
//可指定客户
|
||||
if (isset($params['customer_guid']) && $params['customer_guid']) {
|
||||
$con['a.code_module_category_library_type'] = ModelCodeModuleCategory::LIBRARY_PRIVATE;
|
||||
$con['a.customer_guid'] = $params['customer_guid'];
|
||||
}
|
||||
//可指定库类型
|
||||
if (isset($params['library_type']) && $params['library_type']) {
|
||||
$con['a.code_module_category_library_type'] = $params['library_type'];
|
||||
}
|
||||
|
||||
$query = ModelCodeModuleCategory::alias('a')->field([
|
||||
'a.code_module_category_guid' => 'guid',
|
||||
|
@ -43,8 +43,8 @@ class CodeModule extends BaseController
|
||||
['code_module_name', 'LIKE'],
|
||||
['code_module_audit', '='],
|
||||
['a.customer_guid', '=', 'customer_guid'],
|
||||
['c.code_module_category_library_type', '=', 'library_type'],
|
||||
);
|
||||
$con[] = ['c.code_module_category_library_type', '=', ModelCodeModuleCategory::LIBRARY_PRIVATE];
|
||||
|
||||
$query = ModelCodeModule::where($con)
|
||||
->alias('a')
|
||||
|
Loading…
Reference in New Issue
Block a user