base_from_ths_hf.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. package data_manage
  2. import (
  3. "eta/eta_api/utils"
  4. "fmt"
  5. "github.com/beego/beego/v2/client/orm"
  6. "github.com/rdlucklib/rdluck_tools/paging"
  7. "strings"
  8. "time"
  9. )
  10. // TODO:有时间还是放在配置里面吧...
  11. var (
  12. ThsHfPeriodArr = []int{1, 3, 5, 10, 15, 30, 60} // 时间周期
  13. ThsHfCPSArr = []string{"no", "forward1", "forward2", "forward3", "forward4", "backward1", "backward2", "backward3", "backward4"} // 复权方式
  14. ThsHfFillArr = []string{"Original", "Previous", "Blank"} // 非交易间隔处理
  15. ThsHfEdbCodeCn = map[string]string{"open": "开盘价", "close": "收盘价", "high": "最高价", "low": "最低价", "avgprice": "均价", "volume": "成交价", "amt": "成交额", "pct_chg": "涨跌幅", "oi": "持仓量"} // 可选指标代码对应中文
  16. )
  17. // BaseFromThsHfIndex 同花顺高频数据
  18. type BaseFromThsHfIndex struct {
  19. BaseFromThsHfIndexId int `orm:"column(base_from_ths_hf_index_id);pk"`
  20. BaseFromThsHfClassifyId int `description:"分类ID"`
  21. IndexCode string `description:"指标编码"`
  22. IndexName string `description:"指标名称"`
  23. Unit string `description:"单位"`
  24. Source string `description:"数据来源"`
  25. Frequency string `description:"频度"`
  26. StartDate time.Time `description:"开始日期(至时分秒)"`
  27. EndDate time.Time `description:"结束日期(至时分秒)"`
  28. Describe string `description:"指标描述"`
  29. Sort int `description:"排序"`
  30. IsStop int `description:"是否停更:0-否;1-停更"`
  31. TerminalCode string `description:"所属终端编码"`
  32. StockCode string `description:"证券代码"`
  33. Indicator string `description:"同花顺指标代码"`
  34. ApiPars string `description:"API请求参数"`
  35. LatestValue float64 `description:"最新值"`
  36. SysUserId int `description:"创建人ID"`
  37. SysUserRealName string `description:"创建人姓名"`
  38. CreateTime time.Time `description:"创建时间"`
  39. ModifyTime time.Time `description:"修改时间"`
  40. }
  41. func (m *BaseFromThsHfIndex) TableName() string {
  42. return "base_from_ths_hf_index"
  43. }
  44. type BaseFromThsHfIndexCols struct {
  45. PrimaryId string
  46. BaseFromThsHfClassifyId string
  47. IndexCode string
  48. IndexName string
  49. Unit string
  50. Source string
  51. Frequency string
  52. StartDate string
  53. EndDate string
  54. Describe string
  55. Sort string
  56. IsStop string
  57. TerminalCode string
  58. StockCode string
  59. Indicator string
  60. ApiPars string
  61. LatestValue string
  62. SysUserId string
  63. SysUserRealName string
  64. CreateTime string
  65. ModifyTime string
  66. }
  67. func (m *BaseFromThsHfIndex) Cols() BaseFromThsHfIndexCols {
  68. return BaseFromThsHfIndexCols{
  69. PrimaryId: "base_from_ths_hf_index_id",
  70. BaseFromThsHfClassifyId: "base_from_ths_hf_classify_id",
  71. IndexCode: "index_code",
  72. IndexName: "index_name",
  73. Unit: "unit",
  74. Source: "source",
  75. Frequency: "frequency",
  76. StartDate: "start_date",
  77. EndDate: "end_date",
  78. Describe: "describe",
  79. Sort: "sort",
  80. IsStop: "is_stop",
  81. TerminalCode: "terminal_code",
  82. StockCode: "stock_code",
  83. Indicator: "indicator",
  84. ApiPars: "api_pars",
  85. LatestValue: "latest_value",
  86. SysUserId: "sys_user_id",
  87. SysUserRealName: "sys_user_real_name",
  88. CreateTime: "create_time",
  89. ModifyTime: "modify_time",
  90. }
  91. }
  92. func (m *BaseFromThsHfIndex) Create() (err error) {
  93. o := orm.NewOrmUsingDB("data")
  94. id, err := o.Insert(m)
  95. if err != nil {
  96. return
  97. }
  98. m.BaseFromThsHfIndexId = int(id)
  99. return
  100. }
  101. func (m *BaseFromThsHfIndex) CreateMulti(items []*BaseFromThsHfIndex) (err error) {
  102. if len(items) == 0 {
  103. return
  104. }
  105. o := orm.NewOrmUsingDB("data")
  106. _, err = o.InsertMulti(len(items), items)
  107. return
  108. }
  109. func (m *BaseFromThsHfIndex) Update(cols []string) (err error) {
  110. o := orm.NewOrmUsingDB("data")
  111. _, err = o.Update(m, cols...)
  112. return
  113. }
  114. func (m *BaseFromThsHfIndex) Remove() (err error) {
  115. o := orm.NewOrmUsingDB("data")
  116. sql := fmt.Sprintf(`DELETE FROM %s WHERE %s = ? LIMIT 1`, m.TableName(), m.Cols().PrimaryId)
  117. _, err = o.Raw(sql, m.BaseFromThsHfIndexId).Exec()
  118. return
  119. }
  120. func (m *BaseFromThsHfIndex) MultiRemove(ids []int) (err error) {
  121. if len(ids) == 0 {
  122. return
  123. }
  124. o := orm.NewOrmUsingDB("data")
  125. sql := fmt.Sprintf(`DELETE FROM %s WHERE %s IN (%s)`, m.TableName(), m.Cols().PrimaryId, utils.GetOrmInReplace(len(ids)))
  126. _, err = o.Raw(sql, ids).Exec()
  127. return
  128. }
  129. func (m *BaseFromThsHfIndex) RemoveByCondition(condition string, pars []interface{}) (err error) {
  130. if condition == "" {
  131. return
  132. }
  133. o := orm.NewOrmUsingDB("data")
  134. sql := fmt.Sprintf(`DELETE FROM %s WHERE %s`, m.TableName(), condition)
  135. _, err = o.Raw(sql, pars).Exec()
  136. return
  137. }
  138. func (m *BaseFromThsHfIndex) GetItemById(id int) (item *BaseFromThsHfIndex, err error) {
  139. o := orm.NewOrmUsingDB("data")
  140. sql := fmt.Sprintf(`SELECT * FROM %s WHERE %s = ? LIMIT 1`, m.TableName(), m.Cols().PrimaryId)
  141. err = o.Raw(sql, id).QueryRow(&item)
  142. return
  143. }
  144. func (m *BaseFromThsHfIndex) GetItemByCondition(condition string, pars []interface{}, orderRule string) (item *BaseFromThsHfIndex, err error) {
  145. o := orm.NewOrmUsingDB("data")
  146. order := ``
  147. if orderRule != "" {
  148. order = ` ORDER BY ` + orderRule
  149. }
  150. sql := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s %s LIMIT 1`, m.TableName(), condition, order)
  151. err = o.Raw(sql, pars).QueryRow(&item)
  152. return
  153. }
  154. func (m *BaseFromThsHfIndex) GetCountByCondition(condition string, pars []interface{}) (count int, err error) {
  155. o := orm.NewOrmUsingDB("data")
  156. sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
  157. err = o.Raw(sql, pars).QueryRow(&count)
  158. return
  159. }
  160. func (m *BaseFromThsHfIndex) GetItemsByCondition(condition string, pars []interface{}, fieldArr []string, orderRule string) (items []*BaseFromThsHfIndex, err error) {
  161. o := orm.NewOrmUsingDB("data")
  162. fields := strings.Join(fieldArr, ",")
  163. if len(fieldArr) == 0 {
  164. fields = `*`
  165. }
  166. order := fmt.Sprintf(`ORDER BY %s DESC`, m.Cols().CreateTime)
  167. if orderRule != "" {
  168. order = ` ORDER BY ` + orderRule
  169. }
  170. sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s`, fields, m.TableName(), condition, order)
  171. _, err = o.Raw(sql, pars).QueryRows(&items)
  172. return
  173. }
  174. func (m *BaseFromThsHfIndex) GetPageItemsByCondition(condition string, pars []interface{}, fieldArr []string, orderRule string, startSize, pageSize int) (items []*BaseFromThsHfIndex, err error) {
  175. o := orm.NewOrmUsingDB("data")
  176. fields := strings.Join(fieldArr, ",")
  177. if len(fieldArr) == 0 {
  178. fields = `*`
  179. }
  180. order := fmt.Sprintf(`ORDER BY %s DESC`, m.Cols().CreateTime)
  181. if orderRule != "" {
  182. order = ` ORDER BY ` + orderRule
  183. }
  184. sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
  185. _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
  186. return
  187. }
  188. // BaseFromThsHfIndexItem 同花顺高频数据信息
  189. type BaseFromThsHfIndexItem struct {
  190. IndexId int `description:"同花顺高频数据ID"`
  191. ClassifyId int `description:"分类ID"`
  192. IndexCode string `description:"指标编码"`
  193. IndexName string `description:"指标名称"`
  194. Unit string `description:"单位"`
  195. Source string `description:"数据来源"`
  196. Frequency string `description:"频度"`
  197. StartDate string `description:"开始日期(至时分秒)"`
  198. EndDate string `description:"结束日期(至时分秒)"`
  199. Describe string `description:"指标描述"`
  200. Sort int `description:"排序"`
  201. StockCode string `description:"证券代码"`
  202. Indicator string `description:"同花顺指标代码"`
  203. LatestValue float64 `description:"最新值"`
  204. ClassifyPath string `description:"完整分类路径"`
  205. CreateTime string `description:"创建时间"`
  206. ModifyTime string `description:"修改时间"`
  207. }
  208. func (m *BaseFromThsHfIndex) Format2Item() (item *BaseFromThsHfIndexItem) {
  209. item = new(BaseFromThsHfIndexItem)
  210. item.ClassifyId = m.BaseFromThsHfClassifyId
  211. item.IndexId = m.BaseFromThsHfIndexId
  212. item.IndexCode = m.IndexCode
  213. item.IndexName = m.IndexName
  214. item.Unit = m.Unit
  215. item.Source = m.Source
  216. item.Frequency = m.Frequency
  217. item.StartDate = utils.TimeTransferString(utils.FormatDateTime, m.StartDate)
  218. item.EndDate = utils.TimeTransferString(utils.FormatDateTime, m.EndDate)
  219. item.Describe = m.Describe
  220. item.Sort = m.Sort
  221. item.StockCode = m.StockCode
  222. item.Indicator = m.Indicator
  223. item.LatestValue = m.LatestValue
  224. item.CreateTime = utils.TimeTransferString(utils.FormatDateTime, m.CreateTime)
  225. item.ModifyTime = utils.TimeTransferString(utils.FormatDateTime, m.ModifyTime)
  226. return
  227. }
  228. func (m *BaseFromThsHfIndex) UpdateClassifyMulti(ids []int, classifyId int) (err error) {
  229. if len(ids) == 0 || classifyId <= 0 {
  230. return
  231. }
  232. o := orm.NewOrmUsingDB("data")
  233. sql := fmt.Sprintf(`UPDATE %s SET %s = ?, %s = NOW() WHERE %s IN (%s)`, m.TableName(), m.Cols().BaseFromThsHfClassifyId, m.Cols().ModifyTime, m.Cols().PrimaryId, utils.GetOrmInReplace(len(ids)))
  234. _, err = o.Raw(sql, classifyId, ids).Exec()
  235. return
  236. }
  237. // ThsHfSearchEdbReq 搜索指标请求体
  238. type ThsHfSearchEdbReq struct {
  239. StockCode string `form:"StockCode" description:"证券代码" `
  240. EdbCode string `form:"EdbCode" description:"指标代码"`
  241. StartTime string `form:"StartTime" description:"每日数据开始时间"`
  242. EndTime string `form:"EndTime" description:"每日数据结束时间"`
  243. Interval int `form:"Interval" description:"时间周期"`
  244. Fill string `form:"Fill" description:"非交易间隔处理"`
  245. CPS string `form:"CPS" description:"复权方式"`
  246. BaseDate string `form:"BaseDate" description:"复权基点"`
  247. }
  248. // ThsHfExistCheckResp 指标存在校验响应
  249. type ThsHfExistCheckResp struct {
  250. ExistAll bool `description:"指标是否全部存在: true-是; false-否"`
  251. ExistIndex []ThsHfExistCheckIndex `description:"已存在的指标信息"`
  252. }
  253. // ThsHfExistCheckIndex 指标存在校验-指标信息
  254. type ThsHfExistCheckIndex struct {
  255. IndexId int `description:"指标ID"`
  256. IndexCode string `description:"指标编码"`
  257. IndexName string `description:"指标名称"`
  258. }
  259. // ThsHfSearchEdbResp 响应体
  260. type ThsHfSearchEdbResp struct {
  261. StockCode string `description:"证券代码" `
  262. EdbCode string `description:"指标代码"`
  263. IndexName string `description:"指标名称"`
  264. Frequency int `description:"频度: 1-60"`
  265. IndexData []ThsHfSearchEdbData `description:"指标数据"`
  266. }
  267. type ThsHfSearchEdbData struct {
  268. DataTime string
  269. Value string
  270. }
  271. // ThsHfIndexWithData 同花顺高频指标
  272. type ThsHfIndexWithData struct {
  273. StockCode string `description:"证券代码"`
  274. EdbCode string `description:"指标代码"`
  275. IndexData []*ThsHfIndexData `description:"指标数据"`
  276. }
  277. // ThsHfIndexData 同花顺高频指标数据
  278. type ThsHfIndexData struct {
  279. DataTime time.Time `description:"数据时间(2006-01-02 15:04)"`
  280. Value float64 `description:"数据值"`
  281. }
  282. // ThsHfIndexDataLibResp 同花顺高频指标-指标库响应
  283. type ThsHfIndexDataLibResp struct {
  284. Ret int
  285. Msg string
  286. ErrMsg string
  287. ErrCode string
  288. Data []*ThsHfIndexWithData
  289. Success bool `description:"true 执行成功,false 执行失败"`
  290. }
  291. // ThsHfAddEdbReq 新增指标请求体
  292. type ThsHfAddEdbReq struct {
  293. StartTime string `description:"每日数据开始时间"`
  294. EndTime string `description:"每日数据结束时间"`
  295. Interval int `description:"时间周期"`
  296. Fill string `description:"非交易间隔处理"`
  297. CPS string `description:"复权方式"`
  298. BaseDate string `description:"复权基点"`
  299. IndexList []*ThsHfBaseAddIndexItem `description:"指标信息"`
  300. }
  301. type ThsHfBaseAddIndexItem struct {
  302. ClassifyId int `description:"分类ID"`
  303. Unit string `description:"单位"`
  304. IndexName string `description:"指标名称"`
  305. Frequency string `description:"频度"`
  306. StockCode string `description:"证券代码"`
  307. EdbCode string `description:"指标代码"`
  308. }
  309. type ThsHfBaseAddReq struct {
  310. StartTime string `description:"每日数据开始时间"`
  311. EndTime string `description:"每日数据结束时间"`
  312. Interval int `description:"时间周期"`
  313. Fill string `description:"非交易间隔处理"`
  314. CPS string `description:"复权方式"`
  315. BaseDate string `description:"复权基点"`
  316. SysAdminId int `description:"创建人ID"`
  317. SysAdminName string `description:"创建人姓名"`
  318. ThsHfBaseAddIndexItem `description:"指标信息"`
  319. }
  320. // ThsHfIndexEditReq 编辑指标请求
  321. type ThsHfIndexEditReq struct {
  322. IndexId int `description:"指标ID"`
  323. IndexName string `description:"指标名称"`
  324. ClassifyId int `description:"分类ID"`
  325. Unit string `description:"单位"`
  326. }
  327. // ThsHfIndexOptReq 指标操作请求
  328. type ThsHfIndexOptReq struct {
  329. IndexId int `description:"指标ID"`
  330. }
  331. // ThsHfIndexListChoiceReq 指标列表选择请求
  332. type ThsHfIndexListChoiceReq struct {
  333. ClassifyId string `form:"ClassifyId" description:"分类ID(多选)"`
  334. IncludeChild bool `form:"IncludeChild" description:"是否包含子分类"`
  335. Frequency string `form:"Frequency" description:"频度(多选)"`
  336. SysAdminId string `form:"SysAdminId" description:"创建人ID(多选)"`
  337. Keywords string `form:"Keywords" description:"关键词: 指标ID/指标名称"`
  338. ListIds string `form:"ListIds" description:"列表选择项/排除项(全选为true时为排除项)"`
  339. SelectAll bool `form:"SelectAll" description:"是否全选: true/false"`
  340. }
  341. // ThsHfIndexListChoiceItem 指标列表选择响应
  342. type ThsHfIndexListChoiceItem struct {
  343. IndexId int `description:"指标ID"`
  344. IndexCode string `description:"指标编码"`
  345. IndexName string `description:"指标名称"`
  346. }
  347. // ThsHfIndexMultiOptReq 指标批量操作请求
  348. type ThsHfIndexMultiOptReq struct {
  349. IndexIds []int `description:"指标IDs"`
  350. OptType int `description:"操作类型: 1-移动分类; 2-删除; 3-刷新"`
  351. MoveClassifyId int `description:"移动至分类ID"`
  352. RefreshType int `description:"刷新类型: 1-最近6小时; 2-全部刷新"`
  353. }
  354. // ThsHfIndexListForm 指标列表表单
  355. type ThsHfIndexListForm struct {
  356. PageSize int `form:"PageSize" description:"每页数据量"`
  357. CurrentIndex int `form:"CurrentIndex" description:"页码"`
  358. SortField int `form:"SortField" description:"排序字段: 1-指标开始时间; 2-指标最新时间; 3-更新时间; 4-最新值"`
  359. SortType int `form:"SortType" description:"排序类型: 1-升序; 2-降序"`
  360. ClassifyId string `form:"ClassifyId" description:"分类ID(多选)"`
  361. IncludeChild bool `form:"IncludeChild" description:"是否包含子分类"`
  362. Frequency string `form:"Frequency" description:"频度(多选)"`
  363. SysAdminId string `form:"SysAdminId" description:"创建人ID(多选)"`
  364. Keywords string `form:"Keywords" description:"关键词: 指标ID/指标名称"`
  365. }
  366. type ThsHfIndexPageListResp struct {
  367. List []*BaseFromThsHfIndexItem
  368. Paging *paging.PagingItem `description:"分页数据"`
  369. }
  370. func GetThsHfIndexById(indexId int) (item *BaseFromThsHfIndex, err error) {
  371. o := orm.NewOrmUsingDB("data")
  372. sql := ` SELECT * FROM base_from_ths_hf_index WHERE base_from_ths_hf_index_id = ?`
  373. err = o.Raw(sql, indexId).QueryRow(&item)
  374. return
  375. }
  376. // UpdateThsHfIndexSortByClassifyId 根据分类id更新排序
  377. func UpdateThsHfIndexSortByClassifyId(classifyId, nowSort int, prevEdbInfoId int, updateSort string) (err error) {
  378. o := orm.NewOrmUsingDB("data")
  379. sql := ` update base_from_ths_hf_index set sort = ` + updateSort + ` WHERE base_from_ths_hf_classify_id=?`
  380. if prevEdbInfoId > 0 {
  381. sql += ` AND ( sort > ? or ( base_from_ths_hf_index_id > ` + fmt.Sprint(prevEdbInfoId) + ` and sort=` + fmt.Sprint(nowSort) + ` )) `
  382. } else {
  383. sql += ` AND ( sort > ? )`
  384. }
  385. _, err = o.Raw(sql, classifyId, nowSort).Exec()
  386. return
  387. }
  388. // GetThsHfIndexMaxSortByClassifyId 获取分类下指标的最大的排序数
  389. func GetThsHfIndexMaxSortByClassifyId(classifyId int) (sort int, err error) {
  390. o := orm.NewOrmUsingDB("data")
  391. sql := `SELECT Max(sort) AS sort FROM base_from_ths_hf_index WHERE base_from_ths_hf_classify_id = ?`
  392. err = o.Raw(sql, classifyId).QueryRow(&sort)
  393. return
  394. }
  395. // GetFirstThsHfIndexByClassifyId 获取当前分类下,且排序数相同 的排序第一条的数据
  396. func GetFirstThsHfIndexByClassifyId(classifyId int) (item *BaseFromThsHfIndex, err error) {
  397. o := orm.NewOrmUsingDB("data")
  398. sql := ` SELECT * FROM base_from_ths_hf_index WHERE base_from_ths_hf_classify_id = ? order by sort asc,base_from_ths_hf_index_id asc limit 1`
  399. err = o.Raw(sql, classifyId).QueryRow(&item)
  400. return
  401. }
  402. type ThsHfIndexConvert2EdbRule struct {
  403. ConvertType int `description:"转换类型: 1-指定时间值; 2-区间计算值"`
  404. ConvertFixed struct {
  405. FixedDay int `description:"指定时间值日期: 1-当日; 2-前一日"`
  406. FixedTime string `description:"指定时间值时点(HH:mm:ss)"`
  407. } `description:"指定时间值"`
  408. ConvertArea struct {
  409. StartDay int `description:"起始时间日期: 1-当日; 2-前一日"`
  410. StartTime string `description:"起始时间时点(HH:mm:ss)"`
  411. EndDay int `description:"截止时间日期: 1-当日; 2-前一日"`
  412. EndTime string `description:"截止时间时点(HH:mm:ss)"`
  413. CalculateType int `description:"计算类型: 1-区间均值; 2-最大值; 3-最小值"`
  414. } `description:"区间计算值"`
  415. }
  416. // ThsHfIndexMultiSave2EdbPreReq 批量添加指标库请求
  417. type ThsHfIndexMultiSave2EdbPreReq struct {
  418. ConvertRule ThsHfIndexConvert2EdbRule
  419. IndexIds []int `description:"指标IDs"`
  420. }
  421. type ThsHfIndexMultiSave2EdbReq struct {
  422. ConvertRule ThsHfIndexConvert2EdbRule
  423. NewIndexes []*ThsHfIndexMultiSave2EdbPreItem `description:"新增指标"`
  424. }
  425. type ThsHfIndexMultiSave2EdbLibReq struct {
  426. ConvertRule ThsHfIndexConvert2EdbRule
  427. NewIndex *ThsHfIndexMultiSave2EdbPreItem `description:"新增指标"`
  428. }
  429. // ThsHfIndexMultiSave2EdbPreItem 批量新增指标库信息
  430. type ThsHfIndexMultiSave2EdbPreItem struct {
  431. IndexId int `description:"指标ID"`
  432. IndexCode string `description:"指标编码"`
  433. IndexName string `description:"原指标名称"`
  434. NewIndexName string `description:"新指标名称"`
  435. StockCode string `description:"证券代码"`
  436. EdbCode string `description:"指标代码"`
  437. Unit string `description:"单位"`
  438. Frequency string `description:"原频度"`
  439. NewFrequency string `description:"新频度(固定日度)"`
  440. ClassifyId int `description:"指标库分类ID"`
  441. SysAdminId int `description:"创建人ID"`
  442. SysAdminName string `description:"创建人姓名"`
  443. Tips string `description:"提示信息"`
  444. ErrMsg string `description:"错误信息"`
  445. }
  446. type ThsHfIndexMultiSave2EdbResp struct {
  447. Exist []*ThsHfIndexMultiSave2EdbPreItem `description:"已存在的指标"`
  448. Success []*ThsHfIndexMultiSave2EdbPreItem `description:"添加成功的指标"`
  449. Fail []*ThsHfIndexMultiSave2EdbPreItem `description:"添加失败的指标"`
  450. }
  451. type ThsHfIndexMultiOptResp struct {
  452. Success []*ThsHfIndexBaseInfo `description:"操作成功的指标"`
  453. Fail []*ThsHfIndexBaseInfo `description:"操作失败的指标"`
  454. }
  455. type ThsHfIndexBaseInfo struct {
  456. IndexId int `description:"指标ID"`
  457. IndexCode string `description:"指标编码"`
  458. IndexName string `description:"指标名称"`
  459. }