초기커밋
This commit is contained in:
53
GameServer/Contents/Package/Log/PackageBusinessLogHelper.cs
Normal file
53
GameServer/Contents/Package/Log/PackageBusinessLogHelper.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using ServerCommon;
|
||||
using META_ID = System.UInt32;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
static public class PackageBusinessLogHelper
|
||||
{
|
||||
static public PackageLastOrderRecordData toLastOrderRecodeLogInfo(string orderGuid, META_ID productMetaId, DateTime buyDateTime, DateTime provideTime)
|
||||
{
|
||||
var package = new PackageLastOrderRecordData();
|
||||
package.setLastOrderRecodeInfo(orderGuid, productMetaId, buyDateTime, provideTime);
|
||||
return package;
|
||||
}
|
||||
|
||||
static public void setLastOrderRecodeInfo(this PackageLastOrderRecordData logData, string orderGuid, META_ID productMetaId, DateTime buyDateTime, DateTime provideTime)
|
||||
{
|
||||
logData.orderGuid = orderGuid;
|
||||
logData.productMetaId = productMetaId;
|
||||
logData.buyDateTime = buyDateTime;
|
||||
logData.provideTime = provideTime;
|
||||
}
|
||||
|
||||
static public PackageRepeatData toRepeatLogInfo(PackageRepeatAttribute packageAttribute)
|
||||
{
|
||||
var taskReservation = new PackageRepeatData();
|
||||
taskReservation.setRepeatInfo(packageAttribute);
|
||||
return taskReservation;
|
||||
}
|
||||
|
||||
static public void setRepeatInfo(this PackageRepeatData logData, PackageRepeatAttribute packageAttribute)
|
||||
{
|
||||
logData.orderGuid = packageAttribute.OrderGuid;
|
||||
logData.productMetaId = packageAttribute.ProductMetaId;
|
||||
logData.leftCount = packageAttribute.LeftCount;
|
||||
logData.nextGiveTime = packageAttribute.NextGiveTime;
|
||||
}
|
||||
|
||||
static public PackageStateData toStateLogInfo(string orderGuid, BillingStateType billingStateLogType, string errMsg)
|
||||
{
|
||||
var taskReservation = new PackageStateData();
|
||||
taskReservation.setRepeatInfo(orderGuid, billingStateLogType, errMsg);
|
||||
return taskReservation;
|
||||
}
|
||||
|
||||
static public void setRepeatInfo(this PackageStateData logData, string orderGuid, BillingStateType billingStateLogType, string errMsg)
|
||||
{
|
||||
logData.orderGuid = orderGuid;
|
||||
logData.billingStateLogType = billingStateLogType;
|
||||
logData.errMsg = errMsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user