...
|
...
|
@@ -408,7 +408,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivityDeadline(listExc |
|
|
var deadlines []interface{}
|
|
|
for _, activity := range activities {
|
|
|
//tmpTime := activity.Deadline.UTC().Format("2006-01-02")
|
|
|
tmpTime := activity.Deadline.Format("2006-01-02")
|
|
|
tmpTime := activity.Deadline.Local().Format("2006-01-02")
|
|
|
if !utils.IsContain(deadlines, tmpTime) {
|
|
|
deadlines = append(deadlines, tmpTime)
|
|
|
}
|
...
|
...
|
@@ -498,10 +498,10 @@ func (cashPoolService *CashPoolService) SearchExchangeCashActivity(activityComma |
|
|
"exchangedCash": cash,
|
|
|
"exchangedSuMoney": suMoney,
|
|
|
//"deadline": activity.Deadline.UTC().Format("2006-01-02"),
|
|
|
"deadline": activity.Deadline,
|
|
|
"deadline": activity.Deadline.Local(),
|
|
|
"countDown": activity.CountDown,
|
|
|
"rate": activity.Rate,
|
|
|
"createTime": activity.CreateTime,
|
|
|
"createTime": activity.CreateTime.Local(),
|
|
|
//"createTime": activity.CreateTime.UTC(),
|
|
|
}
|
|
|
activitiesFormat = append(activitiesFormat, activityFormat)
|
...
|
...
|
@@ -597,10 +597,10 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas |
|
|
"companyId": activity.CompanyId,
|
|
|
"exchangedCash": cash,
|
|
|
"exchangedSuMoney": suMoney,
|
|
|
"deadline": activity.Deadline.UnixNano() / 1e6, // 秒级时间戳转换
|
|
|
"deadline": activity.Deadline.Local().UnixNano() / 1e6, // 秒级时间戳转换
|
|
|
"countDown": activity.CountDown,
|
|
|
"rate": activity.Rate,
|
|
|
"createTime": activity.CreateTime,
|
|
|
"createTime": activity.CreateTime.Local(),
|
|
|
}
|
|
|
activitiesWithTs = append(activitiesWithTs, activityWithTs)
|
|
|
}
|
...
|
...
|
@@ -659,6 +659,8 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
activityDeleted.CreateTime = activityDeleted.CreateTime.Local()
|
|
|
activityDeleted.Deadline = activityDeleted.Deadline.Local()
|
|
|
return activityDeleted, nil
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -734,6 +736,8 @@ func (cashPoolService *CashPoolService) GetExchangeCashActivity(getExchangeCashA |
|
|
}
|
|
|
activityUpdated.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedSuMoney), 64)
|
|
|
activityUpdated.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedCash), 64)
|
|
|
activityUpdated.Deadline = activityUpdated.Deadline.Local()
|
|
|
activityUpdated.CreateTime = activityUpdated.CreateTime.Local()
|
|
|
return activityUpdated, nil
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -929,6 +933,8 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
|
|
}
|
|
|
activityUpdated.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedSuMoney), 64)
|
|
|
activityUpdated.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedCash), 64)
|
|
|
activityUpdated.Deadline = activityUpdated.Deadline.Local()
|
|
|
activityUpdated.CreateTime = activityUpdated.CreateTime.Local()
|
|
|
return activityUpdated, nil
|
|
|
}
|
|
|
}
|
...
|
...
|
|