作者 陈志颖

fix:修复返回兑换活动截止时间格式问题

... ... @@ -257,7 +257,8 @@ func (cashPoolService *CashPoolService) CreateExchangeCashActivity(createExchang
CompanyId: createExchangeCashActivityCommand.CompanyId,
ExchangedCash: 0,
ExchangedSuMoney: 0,
Deadline: time.Date(deadline.Year(), deadline.Month(), deadline.Day(), deadline.Hour(), deadline.Minute(), deadline.Second(), 0, time.Local),
//Deadline: time.Date(deadline.Year(), deadline.Month(), deadline.Day(), deadline.Hour(), deadline.Minute(), deadline.Second(), 0, time.Local),
Deadline: createExchangeCashActivityCommand.Deadline,
CountDown: int64(t2.Sub(t1).Hours() / 24), // 计算活动截止倒计时
Rate: createExchangeCashActivityCommand.ExchangeRate,
CreateTime: time.Now(),
... ... @@ -368,6 +369,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas
updateExchangeCashActivity := &command.UpdateExchangeCashActivityCommand {
ExchangeCashActivityId: activity.ActivityId,
CountDown: int64(t2.Sub(t1).Hours() / 24),
Deadline: activity.Deadline,
}
if err := activity.Update(tool_funs.SimpleStructToMap(updateExchangeCashActivity)); err != nil {
... ... @@ -476,6 +478,7 @@ func (cashPoolService *CashPoolService) GetExchangeCashActivity(getExchangeCashA
updateExchangeCashActivity := &command.UpdateExchangeCashActivityCommand {
ExchangeCashActivityId: activity.ActivityId,
CountDown: int64(t2.Sub(t1).Hours() / 24),
Deadline: activity.Deadline,
}
if err := activity.Update(tool_funs.SimpleStructToMap(updateExchangeCashActivity)); err != nil {
... ...