first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\logic\setting\system;
use app\common\logic\BaseLogic;
use app\common\model\setting\OperationLog;
use think\facade\Db;
/**
* 生成器逻辑
* Class OperationLogLogic
* @package app\adminapi\logic\setting\system
*/
class OperationLogLogic extends BaseLogic
{
/**
* @notes 删除表相关信息
* @param $params
* @return bool
* @author 段誉
* @date 2022/6/16 9:30
*/
public static function deleteTable($params)
{
Db::startTrans();
try {
OperationLog::whereIn('id', $params['id'])->delete();
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::$error = $e->getMessage();
return false;
}
}
/**
* @notes 删除日志
* @param $params
* @return bool
* @author 段誉
* @date 2022/6/16 9:30
*/
public static function deleteAll()
{
Db::startTrans();
try {
OperationLog::where('create_time > 0')->delete();
Db::commit();
return true;
} catch (\Exception $e) {
Db::rollback();
self::$error = $e->getMessage();
return false;
}
}
}