54 lines
2.2 KiB
C#
54 lines
2.2 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|