...
|
...
|
@@ -529,18 +529,20 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas |
|
|
// 兑换现金活动返回截止时间处理
|
|
|
var activitiesWithTs []interface{}
|
|
|
for _, activity := range activities {
|
|
|
activityWithTs := map[string]interface{} {
|
|
|
"activityId": activity.ActivityId,
|
|
|
"exchangeActivityName": activity.ExchangeActivityName,
|
|
|
"companyId": activity.CompanyId,
|
|
|
"exchangedCash": activity.ExchangedCash,
|
|
|
"exchangedSuMoney": activity.ExchangedSuMoney,
|
|
|
"deadline": activity.Deadline.UnixNano() / 1e6, // 秒级时间戳转换
|
|
|
"countDown": activity.CountDown,
|
|
|
"rate": activity.Rate,
|
|
|
"createTime": activity.CreateTime.UTC(),
|
|
|
if activity.Deadline.UnixNano() / 1e6 > time.Now().UnixNano() / 1e6 {
|
|
|
activityWithTs := map[string]interface{} {
|
|
|
"activityId": activity.ActivityId,
|
|
|
"exchangeActivityName": activity.ExchangeActivityName,
|
|
|
"companyId": activity.CompanyId,
|
|
|
"exchangedCash": activity.ExchangedCash,
|
|
|
"exchangedSuMoney": activity.ExchangedSuMoney,
|
|
|
"deadline": activity.Deadline.UnixNano() / 1e6, // 秒级时间戳转换
|
|
|
"countDown": activity.CountDown,
|
|
|
"rate": activity.Rate,
|
|
|
"createTime": activity.CreateTime.UTC(),
|
|
|
}
|
|
|
activitiesWithTs = append(activitiesWithTs, activityWithTs)
|
|
|
}
|
|
|
activitiesWithTs = append(activitiesWithTs, activityWithTs)
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"count": count,
|
...
|
...
|
|