...
|
...
|
@@ -32,9 +32,25 @@ func (exchangeCashActivity *ExchangeCashActivity) Identity() interface{} { |
|
|
return exchangeCashActivity.ActivityId
|
|
|
}
|
|
|
|
|
|
// TODO
|
|
|
func (exchangeCashActivity *ExchangeCashActivity) Update(data map[string]interface{}) error {
|
|
|
|
|
|
if exchangeActivityName, ok := data["exchangeActivityName"]; ok && exchangeActivityName != "" {
|
|
|
exchangeCashActivity.ExchangeActivityName = exchangeActivityName.(string)
|
|
|
}
|
|
|
if deadline, ok := data["deadline"]; ok && deadline != "" {
|
|
|
exchangeCashActivity.Deadline = deadline.(time.Time)
|
|
|
}
|
|
|
if countDown, ok := data["countDown"]; ok && countDown != 0 {
|
|
|
exchangeCashActivity.CountDown = countDown.(int64)
|
|
|
}
|
|
|
if exchangedSuMoney, ok := data["exchangedSuMoney"]; ok && exchangedSuMoney != 0 {
|
|
|
exchangeCashActivity.ExchangedSuMoney = exchangedSuMoney.(float64)
|
|
|
}
|
|
|
if exchangedCash, ok := data["exchangedCash"]; ok && exchangedCash != 0 {
|
|
|
exchangeCashActivity.ExchangedCash = exchangedCash.(float64)
|
|
|
}
|
|
|
if exchangeRate, ok := data["exchangeRate"]; ok && exchangeRate != 0 {
|
|
|
exchangeCashActivity.Rate = exchangeRate.(float64)
|
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
|
...
|
...
|
|