chart_celue_push.go 864 B

1234567891011121314151617181920212223242526272829
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. )
  5. type CygxChartCeluePush struct {
  6. Id int `description:"新ID"`
  7. ChartId int `description:"图表ID"`
  8. IsHandle int `description:"文章ID"`
  9. Action string `description:"日志类型:add,edit,move"`
  10. ModifyTime string `description:"修改时间"`
  11. CreateTime string `description:"创建时间"`
  12. }
  13. func GetChartCeluePushList() (item []*CygxChartCeluePush, err error) {
  14. o := orm.NewOrm()
  15. sql := ` SELECT * FROM cygx_chart_celue_push WHERE is_handle = 0 GROUP BY chart_id `
  16. _, err = o.Raw(sql).QueryRows(&item)
  17. return
  18. }
  19. // 更改推送内容是否处理状态
  20. func UpdateCygxChartCeluePush(chartId int) (err error) {
  21. o := orm.NewOrm()
  22. sql := `UPDATE cygx_chart_celue_push SET is_handle=1 WHERE chart_id=? `
  23. _, err = o.Raw(sql, chartId).Exec()
  24. return
  25. }