chart_info_resp.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package data_manage
  2. import (
  3. "eta_gn/eta_api/utils"
  4. "github.com/rdlucklib/rdluck_tools/paging"
  5. )
  6. // ConvertToResp
  7. // @Description: 转成需要输出的格式
  8. // @receiver m
  9. func (m *ChartEdbInfoMapping) ConvertToResp() {
  10. m.ModifyTime = utils.GormDateStrToDateTimeStr(m.ModifyTime)
  11. m.StartDate = utils.GormDateStrToDateStr(m.StartDate)
  12. m.EndDate = utils.GormDateStrToDateStr(m.EndDate)
  13. m.LatestDate = utils.GormDateStrToDateStr(m.LatestDate)
  14. m.MoveLatestDate = utils.GormDateStrToDateStr(m.MoveLatestDate)
  15. return
  16. }
  17. // ConvertToResp
  18. // @Description: 转成需要输出的格式
  19. // @receiver m
  20. func (m *ChartInfoView) ConvertToResp() {
  21. m.CreateTime = utils.GormDateStrToDateTimeStr(m.CreateTime)
  22. m.ModifyTime = utils.GormDateStrToDateTimeStr(m.ModifyTime)
  23. m.StartDate = utils.GormDateStrToDateStr(m.StartDate)
  24. m.EndDate = utils.GormDateStrToDateStr(m.EndDate)
  25. m.SeasonStartDate = utils.GormDateStrToDateStr(m.SeasonStartDate)
  26. m.SeasonEndDate = utils.GormDateStrToDateStr(m.SeasonEndDate)
  27. m.EdbEndDate = utils.GormDateStrToDateStr(m.EdbEndDate)
  28. return
  29. }
  30. // ChartInfoFilterDataResp 搜索指标列表数据返回
  31. type ChartInfoFilterDataResp struct {
  32. Paging *paging.PagingItem
  33. List []*ChartInfoView
  34. }