package NatsServer import ( "ERP_project/Nats" "ERP_project/conf" "ERP_project/logs" natslibs "git.baozhida.cn/ERP_libs/Nats" powerlibs "git.baozhida.cn/ERP_libs/Power" userlibs "git.baozhida.cn/ERP_libs/User" "git.baozhida.cn/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 Read_Power_List_All() (power []powerlibs.Power_R, err error) { nats := natslibs.NewNats(Nats.Nats, conf.NatsSubj_Prefix) power, err = nats.Read_Power_List_All() if err != nil { logs.Error(lib.FuncName(), err) return power, err } return power, 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) }