초기커밋
This commit is contained in:
32
GameServer/Contents/UserReport/log/UserReportBusinessLog.cs
Normal file
32
GameServer/Contents/UserReport/log/UserReportBusinessLog.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class UserReportBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private UserReportLogData m_data_to_log;
|
||||
public UserReportBusinessLog(UserReportLogData log_data_param)
|
||||
: base(LogDomainType.UserReport)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new UserReportLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
static public class UserReportBusinessLogHelper
|
||||
{
|
||||
static public UserReportLogData toLogInfo(UserReportAttrib user_report_attrib)
|
||||
{
|
||||
var userReport = new UserReportLogData();
|
||||
userReport.setInfo(user_report_attrib);
|
||||
return userReport;
|
||||
}
|
||||
|
||||
static public void setInfo(this UserReportLogData logData, UserReportAttrib user_report_attrib)
|
||||
{
|
||||
logData.ReporterGuid = user_report_attrib.ReporterGuid;
|
||||
logData.ReporterNickName = user_report_attrib.ReporterNickName;
|
||||
logData.TargetGuid = user_report_attrib.TargetGuid;
|
||||
logData.TargetNickName = user_report_attrib.TargetNickName;
|
||||
logData.Reason = user_report_attrib.Reason;
|
||||
logData.Title = user_report_attrib.Title;
|
||||
logData.Detail = user_report_attrib.Detail;
|
||||
logData.State = user_report_attrib.State;
|
||||
logData.CreateTime = user_report_attrib.CreateTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user