|
@@ -237,7 +237,8 @@ ORDER BY collect_time DESC LIMIT ?,?`, condition)
|
|
|
|
|
|
type CollectEdbInfoQuery struct {
|
|
|
EdbInfo
|
|
|
- CollectClassifyIdStr string `gorm:"column:collect_classify_id" description:"收藏分类ID"`
|
|
|
+ CollectClassifyIdStr string `gorm:"column:collect_classify_id" description:"收藏分类ID"`
|
|
|
+ CollectTime time.Time `gorm:"column:collect_time" description:"收藏时间"`
|
|
|
}
|
|
|
|
|
|
// CollectEdbInfoItem 收藏列表指标信息
|
|
@@ -255,6 +256,8 @@ type CollectEdbInfoItem struct {
|
|
|
ChartImage string `description:"图表图片"`
|
|
|
ClassifyId int `description:"指标分类ID"`
|
|
|
CollectClassifyIdList []int `description:"收藏分类ID列表"`
|
|
|
+ CollectTime string `description:"收藏时间"`
|
|
|
+ CreateTime string `description:"创建时间"`
|
|
|
}
|
|
|
|
|
|
func FormatEdbInfo2CollectItem(origin *CollectEdbInfoQuery) (item *CollectEdbInfoItem) {
|
|
@@ -275,7 +278,6 @@ func FormatEdbInfo2CollectItem(origin *CollectEdbInfoQuery) (item *CollectEdbInf
|
|
|
if origin.CollectClassifyIdStr != `` {
|
|
|
collectClassifyIdStrList := strings.Split(origin.CollectClassifyIdStr, ",")
|
|
|
for _, v := range collectClassifyIdStrList {
|
|
|
- //collectClassifyIdList =
|
|
|
collectClassifyId, tmpErr := strconv.Atoi(v)
|
|
|
if tmpErr == nil {
|
|
|
collectClassifyIdList = append(collectClassifyIdList, collectClassifyId)
|
|
@@ -283,6 +285,8 @@ func FormatEdbInfo2CollectItem(origin *CollectEdbInfoQuery) (item *CollectEdbInf
|
|
|
}
|
|
|
}
|
|
|
item.CollectClassifyIdList = collectClassifyIdList
|
|
|
+ item.CollectTime = origin.CollectTime.Format(utils.FormatDateTime)
|
|
|
+ item.CreateTime = origin.CreateTime.Format(utils.FormatDateTime)
|
|
|
return
|
|
|
}
|
|
|
|