corpconfig

This commit is contained in:
jiangyong27 2025-03-17 15:27:12 +08:00
parent dc665a80f7
commit 48f1c1d4db
1 changed files with 4 additions and 2 deletions

View File

@ -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)