repositories.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. package repositories
  2. import (
  3. "fwh-toolbox-server/config"
  4. "fwh-toolbox-server/domain"
  5. "fwh-toolbox-server/repositories/api/acceleronix"
  6. "fwh-toolbox-server/repositories/api/fwh_pro"
  7. "fwh-toolbox-server/repositories/api/plane_v1"
  8. "fwh-toolbox-server/repositories/api/plane_v2"
  9. "fwh-toolbox-server/repositories/api/smartHub"
  10. "fwh-toolbox-server/repositories/events"
  11. "fwh-toolbox-server/repositories/mongo"
  12. "fwh-toolbox-server/repositories/mqtt/fwh_mqtt"
  13. pgsql_alarmSnapshot "fwh-toolbox-server/repositories/pgsql/alarmSnapshot"
  14. pgsql_original "fwh-toolbox-server/repositories/pgsql/original"
  15. "fwh-toolbox-server/repositories/redis"
  16. )
  17. // ============ Plane V2 新架构(PlaneService)============
  18. // Plane Feedback 专用实例(绑定固定的 workspace/project/labels)
  19. var Plane *plane_v2.FeedbackPlaneService
  20. // InitPlane 初始化新架构 Plane(启动时调用) - 仅用于 fwh-toolbox 的 Feedback 模块
  21. func InitPlane(cfg *config.PlaneWebApiConfig) {
  22. plane_v2.InitPlaneClient(cfg.Host, cfg.Email, cfg.Password)
  23. Plane = plane_v2.NewFeedbackPlaneService(cfg.WorkspaceSlug, cfg.ProjectId, cfg.LabelBugId, cfg.LabelFeatureId, cfg.LabelFeedbackId)
  24. }
  25. // 通用初始化接口(给MCP Server等外部模块使用)
  26. var InitPlaneClient = plane_v2.InitPlaneClient
  27. var NewPlaneService = plane_v2.NewPlaneService
  28. // 聚合包
  29. /*************** API ***************/
  30. // fwh_pro
  31. type EventAlarmType = fwh_pro.EventAlarmType
  32. const (
  33. EventAndAlarm EventAlarmType = fwh_pro.All // 0
  34. Event EventAlarmType = fwh_pro.Event // 1
  35. Alarm EventAlarmType = fwh_pro.Alarm // 2
  36. )
  37. var FwhHttpInit = fwh_pro.FwhHttpInit
  38. var QuerySiteBaseInfoList = fwh_pro.QuerySiteBaseInfoList
  39. var QuerySiteInfoList = fwh_pro.QuerySiteInfoList
  40. var QuerySiteList = fwh_pro.QuerySiteList
  41. var QuerySiteModeInfo = fwh_pro.QuerySiteModeInfo
  42. var QuerySitePowerFlow = fwh_pro.QuerySitePowerFlow
  43. var QuerySiteAlarmList = fwh_pro.QuerySiteAlarmList
  44. var QueryEventOrAlarmListOnTimeRange = fwh_pro.QueryEventOrAlarmListOnTimeRange
  45. var QueryAlarmSnapshotInfo = fwh_pro.QueryAlarmSnapshotInfo
  46. var QueryMqttLogListOnTimeRange = fwh_pro.QueryMqttLogListOnTimeRange
  47. var QuerySiteShutdownList = fwh_pro.QuerySiteShutdownList
  48. var QueryAlarmStatistics = fwh_pro.QueryAlarmStatistics
  49. var QueryAlarmStatisticsFromCode = fwh_pro.QueryAlarmStatisticsFromCode
  50. // fwh_emsLog
  51. var QueryCallEmsLog = fwh_pro.QueryCallEmsLog // 召唤EMS日志
  52. var QueryEmsLogCallRecord = fwh_pro.QueryEmsLogCallRecord // 查询EMS日志下载地址
  53. var QueryDownloadEmsLogFile = fwh_pro.QueryDownloadEmsLogFile // 请求下载EMS日志文件
  54. // fwh_faultRecord
  55. var QueryFaultRecordList = fwh_pro.QueryFaultRecordList // 查询故障录波日志
  56. var QueryFaultRecordCallableList = fwh_pro.QueryFaultRecordCallableList // 查询设备可召唤数据列表 - 仅自动录播
  57. var QueryCellFaultRecord = fwh_pro.QueryCellFaultRecord // 召唤故障录波日志
  58. var QueryFaultRecordCallRecordList = fwh_pro.QueryFaultRecordCallRecordList // 查询故障录波召唤记录
  59. var QueryFaultRecordSubList = fwh_pro.QueryFaultRecordSubList // 查询故障录波子记录
  60. var QueryDownloadFaultRecordData = fwh_pro.QueryDownloadFaultRecordData // 请求下载录波数据
  61. // fwh_update
  62. var QuerySystemUpdateLog = fwh_pro.QuerySystemUpdateLog // 查询系统升级记录
  63. var QuerySystemUpdateLogDetail = fwh_pro.QuerySystemUpdateLogDetail // 查询系统升级记录详细信息
  64. var QueryAHubUpdateLog = fwh_pro.QueryAHubUpdateLog // 查询aHub升级记录
  65. // fwh_touTemplate
  66. var QueryTouTemplateInfoList = fwh_pro.QueryTouTemplateInfoList // 查询模板列表
  67. var QueryTouTemplateDetailInfo = fwh_pro.QueryTouTemplateDetailInfo
  68. // SmartHub
  69. var QuerySmartHubBatchSimCardInfo = smartHub.QueryBatchSimCardInfo // 批量查询SIM卡信息
  70. var QuerySmartHubSimCardInfo = smartHub.QuerySimCardInfo // 获取SIM卡详细信息
  71. // Acceleronix
  72. var QueryAcceleronixSimCardList = acceleronix.QuerySimCardList // 查询SIM卡列表
  73. var QueryAcceleronixSimCardInfo = acceleronix.QuerySimCardInfo // 查询SIM卡详情
  74. var QueryAcceleronixBatchSimCardDataInfo = acceleronix.QueryBatchSimCardDataInfo // 批量获取SIM卡数据用量信息
  75. var QueryAcceleronixDataPoolList = acceleronix.QueryDataPoolList // 查询流量池列表
  76. var QueryAcceleronixDataPoolSimInfo = acceleronix.QueryDataPoolSimInfo // 查询流量池SIM详情
  77. // Plane_V1
  78. type PlaneConfig = plane_v1.PlaneConfig
  79. type PlaneIntakeIssueRequest = plane_v1.IntakeIssueRequest
  80. type PlaneIntakeIssue = plane_v1.IntakeIssue
  81. type PlaneIntakeIssueResponse = plane_v1.IntakeIssueResponse
  82. type PlaneIntakeListResponse = plane_v1.IntakeListResponse
  83. type PlaneIntakeListItem = plane_v1.IntakeListItem
  84. type PlaneIntakeIssueInfo = plane_v1.IntakeIssueInfo
  85. type PlaneAssetUploadResult = plane_v1.AssetUploadResult
  86. type PlaneAttachmentCreateResponse = plane_v1.AttachmentCreateResponse
  87. var PlaneHttpInit = plane_v1.PlaneHttpInit // 初始化Plane HTTP客户端
  88. var PlaneGetLabelBugId = plane_v1.GetLabelBugId // 获取Bug标签ID
  89. var PlaneGetLabelFeatureId = plane_v1.GetLabelFeatureId // 获取Feature标签ID
  90. // Plane_V1 - User
  91. var PlaneGetMe = plane_v1.GetMe // 获取当前用户信息
  92. // Plane_V1 - Project
  93. var PlaneListProjects = plane_v1.ListProjects // 列出项目
  94. var PlaneCreateProject = plane_v1.CreateProject // 创建项目
  95. var PlaneGetProject = plane_v1.GetProject // 获取项目详情
  96. var PlaneUpdateProject = plane_v1.UpdateProject // 更新项目
  97. var PlaneDeleteProject = plane_v1.DeleteProject // 删除项目
  98. var PlaneArchiveProject = plane_v1.ArchiveProject // 归档项目
  99. var PlaneUnarchiveProject = plane_v1.UnarchiveProject // 取消归档项目
  100. var PlaneGetProjectSummary = plane_v1.GetProjectSummary // 获取项目摘要
  101. // Plane_V1 - Work Item
  102. var PlaneListWorkItems = plane_v1.ListWorkItems // 列出工作项
  103. var PlaneCreateWorkItem = plane_v1.CreateWorkItem // 创建工作项
  104. var PlaneGetWorkItem = plane_v1.GetWorkItem // 获取工作项详情
  105. var PlaneUpdateWorkItem = plane_v1.UpdateWorkItem // 更新工作项
  106. var PlaneDeleteWorkItem = plane_v1.DeleteWorkItem // 删除工作项
  107. var PlaneGetWorkItemByIdentifier = plane_v1.GetWorkItemByIdentifier // 通过标识符获取工作项
  108. var PlaneSearchWorkItems = plane_v1.SearchWorkItems // 搜索工作项
  109. // Plane_V1 - Work Item Link
  110. var PlaneListWorkItemLinks = plane_v1.ListWorkItemLinks // 列出链接
  111. var PlaneCreateWorkItemLink = plane_v1.CreateWorkItemLink // 创建链接
  112. var PlaneGetWorkItemLink = plane_v1.GetWorkItemLink // 获取链接详情
  113. var PlaneUpdateWorkItemLink = plane_v1.UpdateWorkItemLink // 更新链接
  114. var PlaneDeleteWorkItemLink = plane_v1.DeleteWorkItemLink // 删除链接
  115. // Plane_V1 - Work Item Comment
  116. var PlaneListWorkItemComments = plane_v1.ListWorkItemComments // 列出评论
  117. var PlaneCreateWorkItemComment = plane_v1.CreateWorkItemComment // 创建评论
  118. var PlaneGetWorkItemComment = plane_v1.GetWorkItemComment // 获取评论详情
  119. var PlaneUpdateWorkItemComment = plane_v1.UpdateWorkItemComment // 更新评论
  120. var PlaneDeleteWorkItemComment = plane_v1.DeleteWorkItemComment // 删除评论
  121. // Plane_V1 - Work Item Activity
  122. var PlaneListWorkItemActivities = plane_v1.ListWorkItemActivities // 列出活动历史
  123. var PlaneGetWorkItemActivity = plane_v1.GetWorkItemActivity // 获取单条活动
  124. // Plane_V1 - Work Item Attachment
  125. var PlaneListWorkItemAttachments = plane_v1.ListWorkItemAttachments // 列出附件
  126. var PlaneCreateWorkItemAttachment = plane_v1.CreateWorkItemAttachment // 创建附件(获取预签名URL)
  127. var PlaneConfirmWorkItemAttachment = plane_v1.ConfirmWorkItemAttachment // 确认附件上传
  128. var PlaneDeleteWorkItemAttachment = plane_v1.DeleteWorkItemAttachment // 删除附件
  129. var PlaneUploadWorkItemAttachment = plane_v1.UploadWorkItemAttachment // 完整附件上传流程
  130. // Plane_V1 - Work Item Relation
  131. var PlaneListWorkItemRelations = plane_v1.ListWorkItemRelations // 列出关系
  132. var PlaneCreateWorkItemRelation = plane_v1.CreateWorkItemRelation // 创建关系
  133. // Plane_V1 - Intake
  134. var PlaneCreateIntakeIssue = plane_v1.CreateIntakeIssue // 创建Intake Issue
  135. var PlaneGetIntakeIssueList = plane_v1.GetIntakeIssueList // 查询Intake Issue列表
  136. var PlaneGetIntakeIssueDetail = plane_v1.GetIntakeIssueDetail // 获取Intake Issue详情
  137. var PlaneUpdateIntakeIssue = plane_v1.UpdateIntakeIssue // 更新Intake Issue
  138. var PlaneAcceptIntakeIssue = plane_v1.AcceptIntakeIssue // 接受Intake Issue
  139. var PlaneRejectIntakeIssue = plane_v1.RejectIntakeIssue // 拒绝Intake Issue
  140. var PlaneDeleteIntakeIssue = plane_v1.DeleteIntakeIssue // 删除Intake Issue
  141. // Plane_V1 - Asset
  142. var PlaneUploadAsset = plane_v1.UploadAsset // 上传Asset文件
  143. var PlaneDeleteAsset = plane_v1.DeleteAsset // 删除Asset文件
  144. // Plane_V1 - Cycle
  145. var PlaneListCycles = plane_v1.ListCycles // 列出迭代
  146. var PlaneCreateCycle = plane_v1.CreateCycle // 创建迭代
  147. var PlaneGetCycle = plane_v1.GetCycle // 获取迭代详情
  148. var PlaneUpdateCycle = plane_v1.UpdateCycle // 更新迭代
  149. var PlaneDeleteCycle = plane_v1.DeleteCycle // 删除迭代
  150. var PlaneListCycleIssues = plane_v1.ListCycleIssues // 列出迭代工作项
  151. var PlaneAddIssuesToCycle = plane_v1.AddIssuesToCycle // 添加工作项到迭代
  152. var PlaneRemoveIssueFromCycle = plane_v1.RemoveIssueFromCycle // 从迭代移除工作项
  153. var PlaneTransferCycleIssues = plane_v1.TransferCycleIssues // 转移迭代工作项
  154. var PlaneArchiveCycle = plane_v1.ArchiveCycle // 归档迭代
  155. // Plane_V1 - Module
  156. var PlaneListModules = plane_v1.ListModules // 列出模块
  157. var PlaneCreateModule = plane_v1.CreateModule // 创建模块
  158. var PlaneGetModule = plane_v1.GetModule // 获取模块详情
  159. var PlaneUpdateModule = plane_v1.UpdateModule // 更新模块
  160. var PlaneDeleteModule = plane_v1.DeleteModule // 删除模块
  161. var PlaneListModuleIssues = plane_v1.ListModuleIssues // 列出模块工作项
  162. var PlaneAddIssuesToModule = plane_v1.AddIssuesToModule // 添加工作项到模块
  163. var PlaneRemoveIssueFromModule = plane_v1.RemoveIssueFromModule // 从模块移除工作项
  164. var PlaneArchiveModule = plane_v1.ArchiveModule // 归档模块
  165. // Plane_V1 - State
  166. var PlaneListStates = plane_v1.ListStates // 列出状态
  167. var PlaneCreateState = plane_v1.CreateState // 创建状态
  168. var PlaneGetState = plane_v1.GetState // 获取状态详情
  169. var PlaneUpdateState = plane_v1.UpdateState // 更新状态
  170. var PlaneDeleteState = plane_v1.DeleteState // 删除状态
  171. // Plane_V1 - Label
  172. var PlaneListLabels = plane_v1.ListLabels // 列出标签
  173. var PlaneCreateLabel = plane_v1.CreateLabel // 创建标签
  174. var PlaneGetLabel = plane_v1.GetLabel // 获取标签详情
  175. var PlaneUpdateLabel = plane_v1.UpdateLabel // 更新标签
  176. var PlaneDeleteLabel = plane_v1.DeleteLabel // 删除标签
  177. // Plane_V1 - Member
  178. var PlaneListWorkspaceMembers = plane_v1.ListWorkspaceMembers // 列出工作空间成员
  179. var PlaneListProjectMembers = plane_v1.ListProjectMembers // 列出项目成员
  180. var PlaneAddProjectMember = plane_v1.AddProjectMember // 添加项目成员
  181. var PlaneGetProjectMember = plane_v1.GetProjectMember // 获取项目成员详情
  182. var PlaneUpdateProjectMemberRole = plane_v1.UpdateProjectMemberRole // 更新项目成员角色
  183. var PlaneRemoveProjectMember = plane_v1.RemoveProjectMember // 移除项目成员
  184. // Plane_V1 - Invitation
  185. var PlaneListInvitations = plane_v1.ListInvitations // 列出邀请
  186. var PlaneCreateInvitation = plane_v1.CreateInvitation // 创建邀请
  187. var PlaneGetInvitation = plane_v1.GetInvitation // 获取邀请详情
  188. var PlaneUpdateInvitation = plane_v1.UpdateInvitation // 更新邀请
  189. var PlaneDeleteInvitation = plane_v1.DeleteInvitation // 撤销邀请
  190. // Plane_V1 - Sticky
  191. var PlaneListStickies = plane_v1.ListStickies // 列出便签
  192. var PlaneCreateSticky = plane_v1.CreateSticky // 创建便签
  193. var PlaneGetSticky = plane_v1.GetSticky // 获取便签详情
  194. var PlaneUpdateSticky = plane_v1.UpdateSticky // 更新便签
  195. var PlaneDeleteSticky = plane_v1.DeleteSticky // 删除便签
  196. // Plane_V2 Web API (Session + CSRF 认证)
  197. // Plane V2 类型导出(兼容旧调用)
  198. type PlaneWebIntakeIssueRequest = plane_v2.WebIntakeIssueRequest
  199. type PlaneWebIntakeIssueResponse = plane_v2.WebIntakeIssueResponse
  200. type PlaneWebAssetUploadResult = plane_v2.WebAssetUploadResult
  201. const PlaneWebEntityIssueDescription = plane_v2.EntityIssueDescription
  202. /*************** EVENTS ***************/
  203. // Xlog
  204. var GetXlogManageList = events.GetXlogManageList
  205. var SendXlogCmd = events.SendXlogCmd
  206. /*************** MONGO ***************/
  207. // UserInfo
  208. var UserInfoReadAllConfig = mongo.UserInfoReadAllConfig
  209. var UserInfoUpdateAllConfig = mongo.UserInfoUpdateAllConfig
  210. var UserInfoReadSiteInfoManageConfig = mongo.UserInfoReadSiteInfoManageConfig
  211. var UserInfoUpdateSiteInfoManageConfig = mongo.UserInfoUpdateSiteInfoManageConfig
  212. var UserInfoUpdateSiteInfoManageConfigTitleFilter = mongo.UserInfoUpdateSiteInfoManageConfigTitleFilter
  213. var UserInfoUpdateSiteInfoManageConfigCustomQueryFilter = mongo.UserInfoUpdateSiteInfoManageConfigCustomQueryFilter
  214. // SiteMonitor
  215. var GetSiteMonitorConfig = mongo.GetSiteMonitorConfig
  216. var GetSiteMonitorNameList = mongo.GetSiteMonitorNameList
  217. var GetOneSiteMonitorConfig = mongo.GetOneSiteMonitorConfig
  218. var InsertSiteMonitorConfig = mongo.InsertSiteMonitorConfig
  219. var UpdateSiteMonitorConfig = mongo.UpdateSiteMonitorConfig
  220. var DeleteSiteMonitorConfig = mongo.DeleteSiteMonitorConfig
  221. var UpdateSiteMonitorPageConfig = mongo.UpdateSiteMonitorPageConfig
  222. // SiteAnalysis
  223. var GetSiteAnalysisManageList = mongo.GetSiteAnalysisManageList
  224. var GetSiteAnalysisConfig = mongo.GetSiteAnalysisConfig
  225. var InsertSiteAnalysisConfig = mongo.InsertSiteAnalysisConfig
  226. var UpdateSiteAnalysisConfig = mongo.UpdateSiteAnalysisConfig
  227. var UpdateSiteAnalysisDescription = mongo.UpdateSiteAnalysisDescription
  228. var UpdateSiteAnalysisResult = mongo.UpdateSiteAnalysisResult
  229. var DeleteSiteAnalysisConfig = mongo.DeleteSiteAnalysisConfig
  230. var InsertSiteAnalysisData = mongo.InsertSiteAnalysisData
  231. var InsertSiteAnalysisTimeline = mongo.InsertSiteAnalysisTimeline
  232. var InsertSiteAnalysisRuntime = mongo.InsertSiteAnalysisRuntime
  233. // StatisticsShutdown
  234. var GetStatisticsShutdown = mongo.GetStatisticsShutdown
  235. var GetLatestStatisticsShutdown = mongo.GetLatestStatisticsShutdown
  236. var GetStatisticsShutdownByDateRange = mongo.GetStatisticsShutdownByDateRange
  237. var InsertStatisticsShutdown = mongo.InsertStatisticsShutdown
  238. // StatisticsAlarm
  239. var GetStatisticsAlarm = mongo.GetStatisticsAlarm
  240. var GetLatestStatisticsAlarm = mongo.GetLatestStatisticsAlarm
  241. var GetStatisticsAlarmByDateRange = mongo.GetStatisticsAlarmByDateRange
  242. var InsertStatisticsAlarm = mongo.InsertStatisticsAlarm
  243. // BatchDownload
  244. var GetBatchDownloadManageList = mongo.GetBatchDownloadManageList
  245. var GetBatchDownloadConfig = mongo.GetBatchDownloadConfig
  246. var InsertBatchDownloadConfig = mongo.InsertBatchDownloadConfig
  247. var UpdateBatchDownloadDescription = mongo.UpdateBatchDownloadDescription
  248. var UpdateBatchDownloadOwner = mongo.UpdateBatchDownloadOwner
  249. var UpdateBatchDownloadResult = mongo.UpdateBatchDownloadResult
  250. var DeleteBatchDownloadConfig = mongo.DeleteBatchDownloadConfig
  251. var InsertBatchDownloadData = mongo.InsertBatchDownloadData
  252. var GetBatchDownloadData = mongo.GetBatchDownloadData
  253. var InsertBatchDownloadPathPowerFlow = mongo.InsertBatchDownloadPathPowerFlow
  254. var InsertBatchDownloadPathMqttLogs = mongo.InsertBatchDownloadPathMqttLogs
  255. var InsertBatchDownloadPathEventAlarm = mongo.InsertBatchDownloadPathEventAlarm
  256. var InsertBatchDownloadPathEmsLogs = mongo.InsertBatchDownloadPathEmsLogs
  257. var InsertBatchDownloadPathFaultRecord = mongo.InsertBatchDownloadPathFaultRecord
  258. var InsertBatchDownloadPathAlarmSnapshot = mongo.InsertBatchDownloadPathAlarmSnapshot
  259. var InsertBatchDownloadPathUpdateLog = mongo.InsertBatchDownloadPathUpdateLog
  260. var InsertBatchDownloadPathSettings = mongo.InsertBatchDownloadPathSettings
  261. // AutoUpdateConfig
  262. var GetAutoUpdateConfigOption = mongo.GetAutoUpdateConfigOption
  263. var GetAutoUpdatePackages = mongo.GetAutoUpdatePackages
  264. var CreateAutoUpdatePackage = mongo.CreateAutoUpdatePackage
  265. var UpdateAutoUpdatePackage = mongo.UpdateAutoUpdatePackage
  266. var DeleteAutoUpdatePackage = mongo.DeleteAutoUpdatePackage
  267. var GetAutoUpdateAPowerVersion = mongo.GetAutoUpdateAPowerVersion
  268. var UpdateAutoUpdateAPowerVersion = mongo.UpdateAutoUpdateAPowerVersion
  269. var DeleteAutoUpdateAPowerVersion = mongo.DeleteAutoUpdateAPowerVersion
  270. var GetAutoUpdateConfig = mongo.GetAutoUpdateConfig
  271. var UpdateAutoUpdateConfig = mongo.UpdateAutoUpdateConfig
  272. var DeleteAutoUpdateConfig = mongo.DeleteAutoUpdateConfig
  273. var CreateAutoUpdateSpecialConfig = mongo.CreateAutoUpdateSpecialConfig
  274. var DeleteAutoUpdateSpecialConfig = mongo.DeleteAutoUpdateSpecialConfig
  275. // SiteInfoManage
  276. var CreateSiteInfoUpdateInfo = mongo.CreateSiteInfoUpdateInfo
  277. var UpdateSiteInfoUpdateResult = mongo.UpdateSiteInfoUpdateResult
  278. var GetSiteInfoUpdateNewRecord = mongo.GetSiteInfoUpdateNewRecord
  279. var GetSiteInfoManageList = mongo.GetSiteInfoManageList
  280. var InsertSiteInfoData = mongo.InsertSiteInfoData
  281. var GetSiteInfoManageListFromGiccid = mongo.GetSiteInfoManageListFromGiccid
  282. var GetSiteInfoTags = mongo.GetSiteInfoTags
  283. var GetSiteInfoTagsFromId = mongo.GetSiteInfoTagsFromId
  284. var UpdateSiteInfoTag = mongo.UpdateSiteInfoTag
  285. // SimCardManage
  286. var GetSimCardBatchInfo = mongo.GetSimCardBatchInfo
  287. var GetSimCardInfo = mongo.GetSimCardInfo
  288. var GetSimCardMonthlyData = mongo.GetSimCardMonthlyData
  289. var UpdateSimCardInfo = mongo.UpdateSimCardInfo
  290. var UpdateSimCardBatchInfo = mongo.UpdateSimCardBatchInfo
  291. var UpdateSimCardDayData = mongo.UpdateSimCardDayData
  292. var UpdateSimCardBatchDayData = mongo.UpdateSimCardBatchDayData
  293. /*************** PGSQL ***************/
  294. // Alarm Snapshot
  295. var QuerySnapshotFileRecord = pgsql_alarmSnapshot.QuerySnapshotFileRecord
  296. var InsertSnapshotFileRecord = pgsql_alarmSnapshot.InsertSnapshotFileRecord
  297. var QuerySnapshotData = pgsql_alarmSnapshot.QuerySnapshotData
  298. var InsertSnapshotData = pgsql_alarmSnapshot.InsertSnapshotData
  299. // Original
  300. type QuerySitesAnalysisRecord = pgsql_original.QuerySitesAnalysisRecord
  301. var CreateSitesAnalysisRecordTable = pgsql_original.CreateSitesAnalysisRecordTable
  302. /*************** MYSQL ***************/
  303. /*************** REDIS ***************/
  304. // Auth
  305. type SessionInfo = redis.SessionInfo
  306. var StoreSession = redis.StoreSession
  307. var GetSession = redis.GetSession
  308. var DeleteSession = redis.DeleteSession
  309. // BatchDownload
  310. var CreateBatchDownloadCallFileTaskList = redis.CreateCallFileTaskList
  311. var GetBatchDownloadCallFileTaskStandbyList = redis.GetCallFileTaskStandbyList
  312. var GetBatchDownloadCallFileTaskFailedList = redis.GetCallFileTaskFailedList
  313. var DeleteBatchDownloadCallFileTaskList = redis.DeleteCallFileTaskList
  314. var UpdateBatchDownloadCallFileResult = redis.UpdateCallFileResult
  315. // EMS Para
  316. var UpdateEmspara = redis.UpdateEmspara
  317. var GetEmsparaVidInfo = redis.GetEmsparaVidInfo
  318. var GetEmsparaPidInfo = redis.GetEmsparaPidInfo
  319. // AutoUpdateConfig
  320. var RefreshAutoUpdateConfigFileInfo = redis.RefreshAutoUpdateConfigFileInfo
  321. var GetAutoUpdateConfigFileInfoTotal = redis.GetAutoUpdateConfigFileInfoTotal
  322. var GetAutoUpdateConfigFileInfoByPage = redis.GetAutoUpdateConfigFileInfoByPage
  323. // AIChat - Redis
  324. type AiSessionItem = redis.AiSessionItem
  325. type AiActiveSession = redis.AiActiveSession
  326. var SaveAiSession = redis.SaveAiSession
  327. var GetAiSession = redis.GetAiSession
  328. var DeleteAiSession = redis.DeleteAiSession
  329. var SaveAiSessionList = redis.SaveAiSessionList
  330. var GetAiSessionList = redis.GetAiSessionList
  331. var DeleteAiSessionList = redis.DeleteAiSessionList
  332. var UpdateAiSessionTitle = redis.UpdateAiSessionTitle
  333. // AIChat - MongoDB
  334. type AiChatSession = domain.AiChatSession
  335. var UpsertAiChatSession = mongo.UpsertAiChatSession
  336. var GetAiChatSessionsByUser = mongo.GetAiChatSessionsByUser
  337. var UpdateAiChatSessionTitle = mongo.UpdateAiChatSessionTitle
  338. var UpdateAiChatSessionActive = mongo.UpdateAiChatSessionActive
  339. var DeactivateAllAiChatSessions = mongo.DeactivateAllAiChatSessions
  340. var DeleteAiChatSession = mongo.DeleteAiChatSession
  341. /*************** MQTT ***************/
  342. // FwhMqtt
  343. var FwhMqttInit = fwh_mqtt.InitFwhMqttClient
  344. // FwhMqtt - Xlog
  345. var FwhMqttEnableXlog = fwh_mqtt.EnableXlog
  346. // FwhMqtt - Fault Record
  347. var FwhMqttFaultRecordChargeChannel = fwh_mqtt.ChargeChannel
  348. var FwhMqttFaultRecordParamSetting = fwh_mqtt.FaultRecordParamSetting