// **********************************************************************
|
//
|
// Copyright (c) 2008-2023 VCI-Tech, Inc. All rights reserved.
|
//
|
// This copy of Ice is licensed to you under the terms described the
|
// ICE_LICENSE file included this distribution.
|
//
|
// **********************************************************************
|
|
#pragma once
|
|
#include "01-common.ice"
|
|
[["java:package:com.vci.corba"]]
|
["cs:namespace:com.vci.corba"]
|
|
|
// module com {
|
// module vci {
|
// module corba {
|
module log {
|
//data
|
module data {
|
// 日志类型
|
enum LogType {
|
// 登录
|
Login = 1,
|
// 登出
|
Logout = 2,
|
// 授权
|
Grant = 3,
|
// 一般操作
|
General = 4,
|
// 集成操作
|
Integration = 5,
|
// 锁定用户
|
LockUser = 6,
|
// 解锁用户
|
UnlockUser = 7,
|
// 卷文件上传
|
FileUpload = 8,
|
// 卷文件下载
|
FileDownload = 9
|
};
|
|
/**-----------------------日志管理模块-------------------------**/
|
//日志信息
|
struct LogInfo {
|
string puid;//ID
|
string username;//用户名
|
string truename;//姓名
|
string userIp;//用户IP
|
string result;//操作结果
|
string content; // 日志内容
|
string date;//操作日期
|
string type;//操作类型
|
string moduleName;//操作模块
|
string entityDesc;//操作对象的描述
|
string property;//操作的属性
|
string previousVal;//操作前得值
|
string newVal;//操作后的值
|
string logType;// 日志类型
|
};
|
sequence<LogInfo> LogInfoList;
|
|
struct RefObj {
|
string oid; // 业务对象OID
|
string btName; // 业务类型
|
string id; // 对象ID
|
string name; // 业务对象名称
|
};
|
sequence<RefObj> RefObjList;
|
|
//日志保存和备份期限信息
|
struct LogPeriodInfo {
|
string code;//对应的数值,以月为单位
|
string value;//对应的显示名称
|
};
|
sequence<LogPeriodInfo> LogPeriodInfoList;
|
};//end data
|
|
interface LogService {
|
// 测试系统是否能连通
|
bool test() throws common::VCIError;
|
|
/***************************系统功能模块end**************************/
|
|
/**日志管理模块**/
|
//保存日志保存期限
|
bool savePeriod(string period, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
//获取当前日志保存期限
|
int getCurPeriod() throws common::VCIError;
|
//获取日志删除配置,true表示自动,false表示手动
|
bool getIsAutoDelete() throws common::VCIError;
|
//初始化下拉框,获取配置好的值
|
data::LogPeriodInfoList getPeriods() throws common::VCIError;
|
//获取日志页面显示条数
|
long getPageSize() throws common::VCIError;
|
//获取当前查询日志的总条数
|
long getSumLogRows(string sql) throws common::VCIError;
|
//获取当前查询的日志集合
|
data::LogInfoList fetchLogInfo(int pageNo, int pagesize, string sql) throws common::VCIError;
|
//删除日志
|
bool deleteLog(string deleteDate) throws common::VCIError;
|
//根据查询条件获取日志信息
|
data::LogInfoList getLogListByContion(int pageNo, int pagesize, string sql) throws common::VCIError;
|
|
// 简单记录系统登录日志,success:成功/失败, content:内容
|
void saveLoginLog(bool success, string content, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
// 记录登出日志信息
|
void saveLogoutLog(string content, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
// 简单记录用户被锁定日志信息
|
void saveLockLog(string userId, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
|
// 记录日志
|
void saveLog(string result, string content, string opType, data::LogType logType, string objOid, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
// 记录日志
|
void saveObjLog(data::RefObj obj, string opType, string result, data::LogType logType, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
// 批量对象操作记录日志
|
void batchSaveObjLog(data::RefObjList objs, string opType, string result, common::data::UserEntityInfo userEntity) throws common::VCIError;
|
|
}//end interface
|
}//framework
|
// }}}
|