Company.go 390 B

12345678910111213141516
  1. package Account
  2. type Company struct {
  3. Id int `xml:"Id"`
  4. T_mid int `xml:"T_mid"` // 上一级 ID
  5. T_name string `xml:"T_name"` // 公司名称
  6. T_uids string `xml:"T_uids"` // 绑定用户 Uid| 如:U1|U2|
  7. }
  8. func CompanyListToMap(list []Company) map[int]string {
  9. maps := make(map[int]string, len(list))
  10. for _, v := range list {
  11. maps[v.Id] = v.T_name
  12. }
  13. return maps
  14. }