正在显示
1 个修改的文件
包含
13 行增加
和
11 行删除
@@ -529,18 +529,20 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas | @@ -529,18 +529,20 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas | ||
529 | // 兑换现金活动返回截止时间处理 | 529 | // 兑换现金活动返回截止时间处理 |
530 | var activitiesWithTs []interface{} | 530 | var activitiesWithTs []interface{} |
531 | for _, activity := range activities { | 531 | for _, activity := range activities { |
532 | - activityWithTs := map[string]interface{} { | ||
533 | - "activityId": activity.ActivityId, | ||
534 | - "exchangeActivityName": activity.ExchangeActivityName, | ||
535 | - "companyId": activity.CompanyId, | ||
536 | - "exchangedCash": activity.ExchangedCash, | ||
537 | - "exchangedSuMoney": activity.ExchangedSuMoney, | ||
538 | - "deadline": activity.Deadline.UnixNano() / 1e6, // 秒级时间戳转换 | ||
539 | - "countDown": activity.CountDown, | ||
540 | - "rate": activity.Rate, | ||
541 | - "createTime": activity.CreateTime.UTC(), | 532 | + if activity.Deadline.UnixNano() / 1e6 > time.Now().UnixNano() / 1e6 { |
533 | + activityWithTs := map[string]interface{} { | ||
534 | + "activityId": activity.ActivityId, | ||
535 | + "exchangeActivityName": activity.ExchangeActivityName, | ||
536 | + "companyId": activity.CompanyId, | ||
537 | + "exchangedCash": activity.ExchangedCash, | ||
538 | + "exchangedSuMoney": activity.ExchangedSuMoney, | ||
539 | + "deadline": activity.Deadline.UnixNano() / 1e6, // 秒级时间戳转换 | ||
540 | + "countDown": activity.CountDown, | ||
541 | + "rate": activity.Rate, | ||
542 | + "createTime": activity.CreateTime.UTC(), | ||
543 | + } | ||
544 | + activitiesWithTs = append(activitiesWithTs, activityWithTs) | ||
542 | } | 545 | } |
543 | - activitiesWithTs = append(activitiesWithTs, activityWithTs) | ||
544 | } | 546 | } |
545 | return map[string]interface{}{ | 547 | return map[string]interface{}{ |
546 | "count": count, | 548 | "count": count, |
-
请 注册 或 登录 后发表评论