package models import ( "github.com/beego/beego/v2/client/orm" "github.com/rdlucklib/rdluck_tools/paging" "time" ) // CygxMorningMeetingReviews [...] type CygxMorningMeetingReviews struct { Id int `orm:"column(id);pk"` MeetingTime time.Time `json:"meetingTime"` // 晨会日期 PublishTime time.Time `json:"publishTime"` // 发布日期 CreateTime time.Time `json:"createTime"` ModifyTime time.Time `json:"modifyTime"` Status int `json:"status"` // 0:未发布,1:已发布 PartNums int `json:"partNums"` // 段落数 IndustryNames string `json:"industryName"` // 产业名称 } // 列表 func GetCygxMorningMeetingReviewsList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxMorningMeetingReviews, err error) { o := orm.NewOrm() sql := `SELECT * FROM cygx_morning_meeting_reviews WHERE 1=1 ` if condition != "" { sql += condition } sql += ` LIMIT ?,? ` _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items) return } func GetCygxMorningMeetingReviewsListCount(condition string, pars []interface{}) (count int, err error) { o := orm.NewOrm() sql := `SELECT COUNT(1) AS count FROM cygx_morning_meeting_reviews WHERE 1=1 ` if condition != "" { sql += condition } err = o.Raw(sql, pars).QueryRow(&count) return } type CygxMorningMeetingReviewItem struct { Id int `orm:"column(id);pk"` MeetingTime string `json:"meetingTime"` // 晨会日期 PublishTime string `json:"publishTime"` // 发布日期 CreateTime string `json:"createTime"` ModifyTime string `json:"modifyTime"` Status int `json:"status"` // 0:未发布,1:已发布 PartNums int `json:"partNums"` // 段落数 IndustryNames string `json:"industryName"` // 产业名称 } type CygxMorningMeetingReviewsList struct { List []*CygxMorningMeetingReviewItem Paging *paging.PagingItem `description:"分页数据"` } func GetMorningMeetingReviewById(reviewId int) (item *CygxMorningMeetingReviews, err error) { o := orm.NewOrm() sql := `SELECT * FROM cygx_morning_meeting_reviews WHERE id=?` err = o.Raw(sql, reviewId).QueryRow(&item) return } type MorningReviewPublishReq struct { ReviewIds string `description:"晨会id,多个用英文逗号隔开"` } type MorningReviewPublishCancelReq struct { ReviewId int `description:"晨会id"` } type MorningReviewDeleteReq struct { ReviewId int `description:"晨会id"` }