|
@@ -32,9 +32,25 @@ func (exchangeCashActivity *ExchangeCashActivity) Identity() interface{} { |
|
@@ -32,9 +32,25 @@ func (exchangeCashActivity *ExchangeCashActivity) Identity() interface{} { |
32
|
return exchangeCashActivity.ActivityId
|
32
|
return exchangeCashActivity.ActivityId
|
33
|
}
|
33
|
}
|
34
|
|
34
|
|
35
|
-// TODO
|
|
|
36
|
func (exchangeCashActivity *ExchangeCashActivity) Update(data map[string]interface{}) error {
|
35
|
func (exchangeCashActivity *ExchangeCashActivity) Update(data map[string]interface{}) error {
|
37
|
-
|
36
|
+ if exchangeActivityName, ok := data["exchangeActivityName"]; ok && exchangeActivityName != "" {
|
|
|
37
|
+ exchangeCashActivity.ExchangeActivityName = exchangeActivityName.(string)
|
|
|
38
|
+ }
|
|
|
39
|
+ if deadline, ok := data["deadline"]; ok && deadline != "" {
|
|
|
40
|
+ exchangeCashActivity.Deadline = deadline.(time.Time)
|
|
|
41
|
+ }
|
|
|
42
|
+ if countDown, ok := data["countDown"]; ok && countDown != 0 {
|
|
|
43
|
+ exchangeCashActivity.CountDown = countDown.(int64)
|
|
|
44
|
+ }
|
|
|
45
|
+ if exchangedSuMoney, ok := data["exchangedSuMoney"]; ok && exchangedSuMoney != 0 {
|
|
|
46
|
+ exchangeCashActivity.ExchangedSuMoney = exchangedSuMoney.(float64)
|
|
|
47
|
+ }
|
|
|
48
|
+ if exchangedCash, ok := data["exchangedCash"]; ok && exchangedCash != 0 {
|
|
|
49
|
+ exchangeCashActivity.ExchangedCash = exchangedCash.(float64)
|
|
|
50
|
+ }
|
|
|
51
|
+ if exchangeRate, ok := data["exchangeRate"]; ok && exchangeRate != 0 {
|
|
|
52
|
+ exchangeCashActivity.Rate = exchangeRate.(float64)
|
|
|
53
|
+ }
|
38
|
return nil
|
54
|
return nil
|
39
|
}
|
55
|
}
|
40
|
|
56
|
|