201 lines
4.5 KiB
C#
201 lines
4.5 KiB
C#
using Google.Protobuf;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using ServerCommon;
|
|
using ServerCommon.BusinessLogDomain;
|
|
using MetaAssets;
|
|
|
|
|
|
namespace UGQDataAccess.Logs;
|
|
|
|
public class UgqApiLoginBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiLoginLogInfo m_info;
|
|
|
|
public UgqApiLoginBusinessLog(UgqApiLoginType type) : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiLoginLogInfo(this, type);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class UgqApiLogoutBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiLogoutLogInfo m_info;
|
|
|
|
public UgqApiLogoutBusinessLog() : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiLogoutLogInfo(this);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class UgqApiQuestCraeteBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiQuestCraeteLogInfo m_info;
|
|
|
|
public UgqApiQuestCraeteBusinessLog(string quest_content_id, string admin_username) : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiQuestCraeteLogInfo(this, quest_content_id, admin_username);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class UgqApiAddSlotBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiAddSlotLogInfo m_info;
|
|
|
|
public UgqApiAddSlotBusinessLog(int additional_slots, string admin_username) : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiAddSlotLogInfo(this, additional_slots, admin_username);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class UgqApiChangeStateBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiChangeStateLogInfo m_info;
|
|
|
|
public UgqApiChangeStateBusinessLog(string quest_content_id, string from_state, string to_state,
|
|
long quest_id, long revision, string admin_username) : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiChangeStateLogInfo(this, quest_content_id,
|
|
from_state, to_state,
|
|
quest_id, revision, admin_username);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class UgqApiCreatorPointBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiCreatorPointLogInfo m_info;
|
|
|
|
public UgqApiCreatorPointBusinessLog(double amount, long questId, long revision, string admin_username,
|
|
UgqCreatorPointReason reason, string reason_detail) : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiCreatorPointLogInfo(this, amount, questId, revision, admin_username, reason, reason_detail);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
|
|
public class UgqApiAdminLoginBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiAdminLoginLogInfo m_info;
|
|
|
|
public UgqApiAdminLoginBusinessLog(string username) : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiAdminLoginLogInfo(this, username);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class UgqApiEmptyLoginBusinessLog : ILogInvokerEx
|
|
{
|
|
private UgqApiEmptyLogInfo m_info;
|
|
|
|
public UgqApiEmptyLoginBusinessLog() : base(LogDomainType.UgqApi)
|
|
{
|
|
m_info = new UgqApiEmptyLogInfo(this);
|
|
}
|
|
|
|
public override bool hasLog()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
protected override void fillup(ref BusinessLog.LogBody body)
|
|
{
|
|
body.append(m_info);
|
|
}
|
|
}
|
|
|
|
public class EmptyBusinessWithLogActor : IWithLogActor
|
|
{
|
|
public ILogActor toLogActor()
|
|
{
|
|
var log_info = new EmptyBusinessLogActor();
|
|
return log_info;
|
|
}
|
|
}
|
|
|
|
public class EmptyBusinessLogActor : ILogActor
|
|
{
|
|
public DateTime m_date { get; set; } = DateTimeHelper.Current;
|
|
|
|
public EmptyBusinessLogActor()
|
|
{
|
|
m_date = DateTimeHelper.Current;
|
|
}
|
|
|
|
public EmptyBusinessLogActor(EmptyBusinessLogActor logInfo)
|
|
{
|
|
m_date = logInfo.m_date;
|
|
}
|
|
} |