From 48f1c1d4db843c1a8ab9ef3880e4e8df51dbb85e Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Mon, 17 Mar 2025 15:27:12 +0800 Subject: [PATCH] corpconfig --- server/service/staff_user.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)