32 lines
967 B
PHP
32 lines
967 B
PHP
<?php
|
||
|
||
namespace app\common\logic\Code;
|
||
|
||
use app\common\model\Code\CodeModuleCategory as ModelCodeModuleCategory;
|
||
use app\common\model\Code\CodeModule as ModelCodeModule;
|
||
use app\common\exception\Tool;
|
||
use app\common\logic\Code\CodeCommon as CommonLogicCodeCommon;
|
||
use app\BaseModel;
|
||
|
||
class CodeModule
|
||
{
|
||
/**
|
||
* 操作时审核状态处理
|
||
*
|
||
* @param BaseModel &$model 模型实例
|
||
* @param string $op 操作类型 ( add:新增 edit:编辑 )
|
||
* @param int $ibrary_type 库类型
|
||
* @return void
|
||
* @date 2023-07-12
|
||
* @author xjh
|
||
* @since 1.0.0
|
||
*/
|
||
public static function handleOpAudit(BaseModel &$model, string $op): void
|
||
{
|
||
$category = ModelCodeModuleCategory::find($model->code_module_category_guid);
|
||
if (!$category) {
|
||
throwErrorMsg("类目不存在!");
|
||
}
|
||
CommonLogicCodeCommon::handleOpAudit($model, $op, $category->code_module_category_library_type);
|
||
}
|
||
} |