1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package Account
- import (
- userlibs "git.baozhida.cn/ERP_libs/User"
- "sync"
- )
- var User_r *userlibs.User
- var AdminMap *sync.Map // 泛型
- func init() {
- AdminMap = new(sync.Map)
- }
- func Read_User_All_Map(A []userlibs.User) {
- for _, v := range A {
- AdminMap.Store(v.T_uuid, v)
- }
- }
- func Read_User_T_name_Get(T_uuid string) string {
- v, ok := AdminMap.Load(T_uuid)
- if ok {
- return v.(userlibs.User).T_name
- } else {
- return ""
- }
- }
- func Read_User_T_dept_Get(T_uuid string) string {
- v, ok := AdminMap.Load(T_uuid)
- if ok {
- return v.(userlibs.User).T_dept_name
- } else {
- return ""
- }
- }
- func Read_User_T_post_Get(T_uuid string) string {
- v, ok := AdminMap.Load(T_uuid)
- if ok {
- return v.(userlibs.User).T_post_name
- } else {
- return ""
- }
- }
|