|
@@ -37,17 +37,16 @@ type PartnerInfo struct { |
|
@@ -37,17 +37,16 @@ type PartnerInfo struct { |
37
|
}
|
37
|
}
|
38
|
|
38
|
|
39
|
//TODO
|
39
|
//TODO
|
40
|
-func (partner *PartnerInfo) Update(data map[string]string) error {
|
|
|
41
|
- return nil
|
|
|
42
|
-}
|
|
|
43
|
-
|
|
|
44
|
-//TODO
|
|
|
45
|
-func (partner *PartnerInfo) ChangeStatus(yesOrNo bool) error {
|
|
|
46
|
- return nil
|
|
|
47
|
-}
|
|
|
48
|
-
|
|
|
49
|
-//TODO
|
|
|
50
|
-func (partner *PartnerInfo) ChangePassword(pwd string) error {
|
40
|
+func (partner *PartnerInfo) Update(data map[string]interface{}) error {
|
|
|
41
|
+ if v, ok := data["partnerName"]; ok {
|
|
|
42
|
+ partner.Partner.PartnerName = v.(string)
|
|
|
43
|
+ }
|
|
|
44
|
+ if v, ok := data["account"]; ok {
|
|
|
45
|
+ partner.Partner.Account = v.(string)
|
|
|
46
|
+ }
|
|
|
47
|
+ if v, ok := data["partnerCategory"]; ok {
|
|
|
48
|
+ partner.PartnerCategory = v.(int)
|
|
|
49
|
+ }
|
51
|
return nil
|
50
|
return nil
|
52
|
}
|
51
|
}
|
53
|
|
52
|
|