|
@@ -62,6 +62,7 @@ type ChartInfo struct {
|
|
|
ForumChartInfoId int `description:"社区的图表ID"`
|
|
|
ChartAlias string `description:"图表别名"`
|
|
|
DateTypeNum int `description:"date_type=25(N月前)时的N值,其他N值可复用此字段"`
|
|
|
+ ResourceStatus int `description:"资源状态,0默认, 1上架,2下架"`
|
|
|
}
|
|
|
|
|
|
// AreaExtraConf 面积图配置
|
|
@@ -378,14 +379,15 @@ func ModifyChartInfo(item *EditChartInfoReq) (err error) {
|
|
|
err = o.Exec(sql, item.ChartName, item.ChartClassifyId, item.ChartInfoId).Error
|
|
|
return
|
|
|
}
|
|
|
-func SetForumChartInfoId(chartInfoId, forumChartInfoId int) (err error) {
|
|
|
+func SetForumChartInfoId(chartInfoId, forumChartInfoId int, resourceStatus int) (err error) {
|
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
|
sql := ` UPDATE chart_info
|
|
|
SET
|
|
|
forum_chart_info_id=?,
|
|
|
- modify_time = NOW()
|
|
|
+ modify_time = NOW(),
|
|
|
+ resource_status = ?
|
|
|
WHERE chart_info_id = ?`
|
|
|
- err = o.Exec(sql, forumChartInfoId, chartInfoId).Error
|
|
|
+ err = o.Exec(sql, forumChartInfoId, resourceStatus, chartInfoId).Error
|
|
|
return
|
|
|
}
|
|
|
|