diff --git a/server/service/staff_user.go b/server/service/staff_user.go index 2d8e55e..f265a69 100644 --- a/server/service/staff_user.go +++ b/server/service/staff_user.go @@ -68,10 +68,12 @@ func (s *StaffUser) List(sess *session.AdminSession, req *api.StaffListReq) (int } // config - var staffConfig map[string]interface{} + staffConfig := make(map[string]interface{}) + corpConfig := make(map[string]interface{}) + json.Unmarshal([]byte(goutil.EncodeJSON(corpStaffConfig)), &corpConfig) json.Unmarshal([]byte(st.Config), &staffConfig) config := make([]map[string]interface{}, 0) - for _, kv := range corpStaffConfig { + for _, kv := range corpConfig { obj := cast.ToStringMap(kv) obj["value"] = cast.ToString(staffConfig[cast.ToString(obj["key"])]) config = append(config, obj)