repositories.go 20 KB

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