This commit is contained in:
Putoo
2026-07-17 18:12:08 +08:00
parent c80841880c
commit e4d39f3f2f
9 changed files with 223 additions and 26 deletions

View File

@@ -127,24 +127,7 @@ public class ExchangeController : ControllerBase
{
if (await GameBus.UpdateBag(userId, 0, exInfo.needData, "兑换", count))
{
long endTime = 0;
switch (exInfo.exType)
{
case "Long":
endTime = TimeExtend.GetTimeStampBySeconds((DateTime)exInfo.endTime);
break;
case "Day":
endTime = TimeExtend.GetTimeStampBySeconds(TimeAssist.GetDateTimeYMD(1));
break;
case "Month":
DateTime nt = DateTime.Now.AddMonths(1);
nt = Convert.ToDateTime($"{nt.Year}-{nt.Month}-01");
endTime = TimeExtend.GetTimeStampBySeconds(nt);
break;
case "Week":
endTime = TimeExtend.GetTimeStampBySeconds(TimeAssist.WeekEndTime);
break;
}
long endTime = TimeExtend.GetTimeStampSecondsByCode(exInfo.exType, (DateTime)exInfo.endTime);
if (await _exchangeService.AddUserExchangeLog(userId, exId, count, endTime))
{