초기커밋
This commit is contained in:
33
GameServer/Contents/BeaconShop/Log/BeaconShopBusinessLog.cs
Normal file
33
GameServer/Contents/BeaconShop/Log/BeaconShopBusinessLog.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class BeaconShopBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private BeaconShopLogData m_data_to_log;
|
||||
public BeaconShopBusinessLog(BeaconShopLogData log_data_param)
|
||||
: base(LogDomainType.BeaconShop)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new BeaconShopLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using ServerCommon;
|
||||
using META_ID = System.UInt32;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
static public class BeaconShopBusinessLogHelper
|
||||
{
|
||||
static public BeaconShopLogData toLogInfo(BeaconShopMongoDoc beaconShopMongoDoc)
|
||||
{
|
||||
var logData = new BeaconShopLogData();
|
||||
logData.setInfo(beaconShopMongoDoc);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setInfo(this BeaconShopLogData logData, BeaconShopMongoDoc beaconShopMongoDoc)
|
||||
{
|
||||
logData.ItemGuid = beaconShopMongoDoc.ItemGuid;
|
||||
logData.TagId = beaconShopMongoDoc.TagId;
|
||||
logData.BeaconGuid = beaconShopMongoDoc.BeaconGuid;
|
||||
logData.BeaconNickName = beaconShopMongoDoc.BeaconNickName;
|
||||
logData.BeaconTitle = beaconShopMongoDoc.BeaconTitle;
|
||||
logData.BeaconBodyItemMetaId = beaconShopMongoDoc.BeaconBodyItemMetaId;
|
||||
logData.PriceForUnit = beaconShopMongoDoc.PriceForUnit;
|
||||
logData.Amount = beaconShopMongoDoc.Amount;
|
||||
logData.OwnerGuid = beaconShopMongoDoc.OwnerGuid;
|
||||
logData.OwnerNickName = beaconShopMongoDoc.OwnerNickName;
|
||||
logData.BeaconMyHomeGuid = beaconShopMongoDoc.BeaconMyHomeGuid;
|
||||
logData.SellingFinishTime = beaconShopMongoDoc.SellingFinishTime;
|
||||
logData.BuyerGuid = string.Empty;
|
||||
}
|
||||
|
||||
static public BeaconShopLogData toLogInfo(BeaconShopItemAttribute beaconShopItemAttribute, UgcNpcAttribute ugcNpcAttribute, string buyerGuid)
|
||||
{
|
||||
var logData = new BeaconShopLogData();
|
||||
logData.setInfo(beaconShopItemAttribute, ugcNpcAttribute, buyerGuid);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setInfo(this BeaconShopLogData logData, BeaconShopItemAttribute beaconShopItemAttribute, UgcNpcAttribute ugcNpcAttribute, string buyerGuid)
|
||||
{
|
||||
logData.ItemGuid = beaconShopItemAttribute.ItemGuid;
|
||||
logData.TagId = (int)beaconShopItemAttribute.ItemMetaId;
|
||||
logData.BeaconGuid = beaconShopItemAttribute.BeaconGuid;
|
||||
logData.BeaconNickName = ugcNpcAttribute.Nickname;
|
||||
logData.BeaconTitle = ugcNpcAttribute.Title;
|
||||
logData.BeaconBodyItemMetaId = (int)ugcNpcAttribute.BodyItemMetaId;
|
||||
logData.PriceForUnit = beaconShopItemAttribute.PriceForUnit;
|
||||
logData.Amount = beaconShopItemAttribute.ItemStackCount;
|
||||
logData.OwnerGuid = beaconShopItemAttribute.UserGuid;
|
||||
logData.BeaconMyHomeGuid = ugcNpcAttribute.LocatedInstanceGuid;
|
||||
logData.SellingFinishTime = beaconShopItemAttribute.SellingFinishTime;
|
||||
logData.BuyerGuid = buyerGuid;
|
||||
}
|
||||
|
||||
static public BeaconShopSoldRecordLogData toLogInfo(BeaconShopSoldRecordAttribute beaconShopSoldRecordAttribute)
|
||||
{
|
||||
var logData = new BeaconShopSoldRecordLogData();
|
||||
logData.setInfo(beaconShopSoldRecordAttribute);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setInfo(this BeaconShopSoldRecordLogData logData, BeaconShopSoldRecordAttribute beaconShopSoldRecordAttribute)
|
||||
{
|
||||
logData.UserGuid = beaconShopSoldRecordAttribute.UserGuid;
|
||||
logData.BeaconGuid = beaconShopSoldRecordAttribute.BeaconGuid;
|
||||
logData.ItemMetaId = beaconShopSoldRecordAttribute.ItemMetaId;
|
||||
logData.BuyerNickName = beaconShopSoldRecordAttribute.BuyerNickName;
|
||||
logData.PriceForUnit = beaconShopSoldRecordAttribute.PriceForUnit;
|
||||
logData.Amount = beaconShopSoldRecordAttribute.Amount;
|
||||
logData.SalesTime = beaconShopSoldRecordAttribute.SalesTime;
|
||||
}
|
||||
|
||||
static public BeaconShopSoldPriceLogData toLogInfo(string userGuid, string beaconGuid, double deltaPrice, double deltaTaxPrice)
|
||||
{
|
||||
var logData = new BeaconShopSoldPriceLogData();
|
||||
logData.setInfo(userGuid, beaconGuid, deltaPrice, deltaTaxPrice);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setInfo(this BeaconShopSoldPriceLogData logData, string userGuid, string beaconGuid, double deltaPrice, double deltaTaxPrice)
|
||||
{
|
||||
logData.UserGuid = userGuid;
|
||||
logData.BeaconGuid = beaconGuid;
|
||||
logData.deltaPrice = deltaPrice;
|
||||
logData.deltaTaxPrice = deltaTaxPrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class BeaconShopSoldPriceBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private BeaconShopSoldPriceLogData m_data_to_log;
|
||||
public BeaconShopSoldPriceBusinessLog(BeaconShopSoldPriceLogData log_data_param)
|
||||
: base(LogDomainType.BeaconShopSoldPrice)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new BeaconShopSoldPriceLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
@@ -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 BeaconShopSoldRecordBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private BeaconShopSoldRecordLogData m_data_to_log;
|
||||
public BeaconShopSoldRecordBusinessLog(BeaconShopSoldRecordLogData log_data_param)
|
||||
: base(LogDomainType.BeaconShopSoldRecord)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new BeaconShopSoldRecordLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user