drag-create-api/app/common/logic/Code/CodeModule.php

32 lines
967 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);
}
}