|
@@ -408,7 +408,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivityDeadline(listExc |
|
@@ -408,7 +408,7 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivityDeadline(listExc |
408
|
var deadlines []interface{}
|
408
|
var deadlines []interface{}
|
409
|
for _, activity := range activities {
|
409
|
for _, activity := range activities {
|
410
|
//tmpTime := activity.Deadline.UTC().Format("2006-01-02")
|
410
|
//tmpTime := activity.Deadline.UTC().Format("2006-01-02")
|
411
|
- tmpTime := activity.Deadline.Format("2006-01-02")
|
411
|
+ tmpTime := activity.Deadline.Local().Format("2006-01-02")
|
412
|
if !utils.IsContain(deadlines, tmpTime) {
|
412
|
if !utils.IsContain(deadlines, tmpTime) {
|
413
|
deadlines = append(deadlines, tmpTime)
|
413
|
deadlines = append(deadlines, tmpTime)
|
414
|
}
|
414
|
}
|
|
@@ -498,10 +498,10 @@ func (cashPoolService *CashPoolService) SearchExchangeCashActivity(activityComma |
|
@@ -498,10 +498,10 @@ func (cashPoolService *CashPoolService) SearchExchangeCashActivity(activityComma |
498
|
"exchangedCash": cash,
|
498
|
"exchangedCash": cash,
|
499
|
"exchangedSuMoney": suMoney,
|
499
|
"exchangedSuMoney": suMoney,
|
500
|
//"deadline": activity.Deadline.UTC().Format("2006-01-02"),
|
500
|
//"deadline": activity.Deadline.UTC().Format("2006-01-02"),
|
501
|
- "deadline": activity.Deadline,
|
501
|
+ "deadline": activity.Deadline.Local(),
|
502
|
"countDown": activity.CountDown,
|
502
|
"countDown": activity.CountDown,
|
503
|
"rate": activity.Rate,
|
503
|
"rate": activity.Rate,
|
504
|
- "createTime": activity.CreateTime,
|
504
|
+ "createTime": activity.CreateTime.Local(),
|
505
|
//"createTime": activity.CreateTime.UTC(),
|
505
|
//"createTime": activity.CreateTime.UTC(),
|
506
|
}
|
506
|
}
|
507
|
activitiesFormat = append(activitiesFormat, activityFormat)
|
507
|
activitiesFormat = append(activitiesFormat, activityFormat)
|
|
@@ -597,10 +597,10 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas |
|
@@ -597,10 +597,10 @@ func (cashPoolService *CashPoolService) ListExchangeCashActivity(listExchangeCas |
597
|
"companyId": activity.CompanyId,
|
597
|
"companyId": activity.CompanyId,
|
598
|
"exchangedCash": cash,
|
598
|
"exchangedCash": cash,
|
599
|
"exchangedSuMoney": suMoney,
|
599
|
"exchangedSuMoney": suMoney,
|
600
|
- "deadline": activity.Deadline.UnixNano() / 1e6, // 秒级时间戳转换
|
600
|
+ "deadline": activity.Deadline.Local().UnixNano() / 1e6, // 秒级时间戳转换
|
601
|
"countDown": activity.CountDown,
|
601
|
"countDown": activity.CountDown,
|
602
|
"rate": activity.Rate,
|
602
|
"rate": activity.Rate,
|
603
|
- "createTime": activity.CreateTime,
|
603
|
+ "createTime": activity.CreateTime.Local(),
|
604
|
}
|
604
|
}
|
605
|
activitiesWithTs = append(activitiesWithTs, activityWithTs)
|
605
|
activitiesWithTs = append(activitiesWithTs, activityWithTs)
|
606
|
}
|
606
|
}
|
|
@@ -659,6 +659,8 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
|
@@ -659,6 +659,8 @@ func (cashPoolService *CashPoolService) RemoveExchangeCashActivity(removeExchang |
659
|
if err := transactionContext.CommitTransaction(); err != nil {
|
659
|
if err := transactionContext.CommitTransaction(); err != nil {
|
660
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
660
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
661
|
}
|
661
|
}
|
|
|
662
|
+ activityDeleted.CreateTime = activityDeleted.CreateTime.Local()
|
|
|
663
|
+ activityDeleted.Deadline = activityDeleted.Deadline.Local()
|
662
|
return activityDeleted, nil
|
664
|
return activityDeleted, nil
|
663
|
}
|
665
|
}
|
664
|
}
|
666
|
}
|
|
@@ -734,6 +736,8 @@ func (cashPoolService *CashPoolService) GetExchangeCashActivity(getExchangeCashA |
|
@@ -734,6 +736,8 @@ func (cashPoolService *CashPoolService) GetExchangeCashActivity(getExchangeCashA |
734
|
}
|
736
|
}
|
735
|
activityUpdated.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedSuMoney), 64)
|
737
|
activityUpdated.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedSuMoney), 64)
|
736
|
activityUpdated.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedCash), 64)
|
738
|
activityUpdated.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedCash), 64)
|
|
|
739
|
+ activityUpdated.Deadline = activityUpdated.Deadline.Local()
|
|
|
740
|
+ activityUpdated.CreateTime = activityUpdated.CreateTime.Local()
|
737
|
return activityUpdated, nil
|
741
|
return activityUpdated, nil
|
738
|
}
|
742
|
}
|
739
|
}
|
743
|
}
|
|
@@ -929,6 +933,8 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
|
@@ -929,6 +933,8 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashActivity(updateExchang |
929
|
}
|
933
|
}
|
930
|
activityUpdated.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedSuMoney), 64)
|
934
|
activityUpdated.ExchangedSuMoney, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedSuMoney), 64)
|
931
|
activityUpdated.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedCash), 64)
|
935
|
activityUpdated.ExchangedCash, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", activityUpdated.ExchangedCash), 64)
|
|
|
936
|
+ activityUpdated.Deadline = activityUpdated.Deadline.Local()
|
|
|
937
|
+ activityUpdated.CreateTime = activityUpdated.CreateTime.Local()
|
932
|
return activityUpdated, nil
|
938
|
return activityUpdated, nil
|
933
|
}
|
939
|
}
|
934
|
}
|
940
|
}
|