package NatsServer import ( "ERP_salary/Nats" "ERP_salary/conf" "ERP_salary/logs" natslibs "gogs.baozhida.cn/zoie/ERP_libs/Nats" userlibs "gogs.baozhida.cn/zoie/ERP_libs/User" "gogs.baozhida.cn/zoie/ERP_libs/lib" ) // 验证TOKEY func Verification(GetCookie string, GetString string) (user userlibs.User, err error) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) user, err = nats.Verification(GetCookie, GetString) if err != nil { logs.Error(lib.FuncName(), err) return user, err } return user, nil } func Read_User_List_All() (user []userlibs.User, err error) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) user, err = nats.Read_User_List_All() if err != nil { logs.Error(lib.FuncName(), err) return user, err } return user, nil } func Read_User_List_T_uuid(T_name string, T_uuid_list []string, page, page_z int) (user []userlibs.User, cnt int64, err error) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) user, cnt, err = nats.Read_User_List_T_uuid(T_name, T_uuid_list, page, page_z) if err != nil { logs.Error(lib.FuncName(), err) return user, cnt, err } return user, cnt, nil } // 添加系统日志 func AddSysLogs(T_class, T_title string, T_txt interface{}) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) nats.AddSysLogs(T_class, T_title, T_txt) } // 添加用户日志 func AddUserLogs(T_uuid, T_class, T_title string, T_txt interface{}) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) nats.AddUserLogs(T_uuid, T_class, T_title, T_txt) } // 添加用户日志 func AddNews(T_uuid, T_title, T_Url string) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) nats.AddNews(T_uuid, T_title, T_Url) }