1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- // CygxMorningMeetingReviewChapter [...]
- type CygxMorningMeetingReviewChapter struct {
- Id int `orm:"column(id);pk"`
- MeetingTime time.Time `json:"meetingTime"` // 晨会日期
- CreateTime time.Time `json:"createTime"`
- ModifyTime time.Time `json:"modifyTime"`
- IndustryId int `json:"industryId"` // 产业id
- IndustryName string `json:"industryName"` // 产业名称
- ChartPermissionName string `json:"chartPermissionName"` // 行业名称
- ChartPermissionId int `json:"chartPermissionId"` // 行业id
- IndustrialSubjectIds string `json:"industrialSubjectId"` // 标的id
- MeetingId int64 `json:"meetingId"` // 主表id
- Content string `json:"content"` // 内容
- }
- // 通过ID获取详情
- func GetCygxMorningMeetingReviewChapterDetail(id int) (item *CygxMorningMeetingReviewChapter, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_morning_meeting_review_chapter WHERE id =? `
- err = o.Raw(sql, id).QueryRow(&item)
- return
- }
- // 列表
- func GetCygxMorningMeetingReviewChapterList(condition string, pars []interface{}) (items []*CygxMorningMeetingGatherDetailListResp, err error) {
- o := orm.NewOrm()
- sql := `SELECT c.*,r.publish_time
- FROM cygx_morning_meeting_review_chapter as c
- INNER JOIN cygx_morning_meeting_reviews as r ON r.id = c.meeting_id WHERE 1 = 1 AND r.status = 1 `
- if condition != "" {
- sql += condition
- }
- _, err = o.Raw(sql, pars).QueryRows(&items)
- return
- }
- type IndustrialSubjectItem struct {
- IndustrialSubjectId int `orm:"column(industrial_subject_id);pk" description:"标的id"`
- SubjectName string `description:"标的名称"`
- }
- type CygxMorningMeetingReviewChapterRespItem struct {
- Id int `orm:"column(id);pk"`
- MeetingTime time.Time `json:"meetingTime"` // 晨会日期
- CreateTime time.Time `json:"createTime"`
- ModifyTime time.Time `json:"modifyTime"`
- IndustryId int `json:"industryId"` // 产业id
- IndustryName string `json:"industryName"` // 产业名称
- ChartPermissionName string `json:"chartPermissionName"` // 行业名称
- ChartPermissionId int `json:"chartPermissionId"` // 行业id
- IndustrialSubjectList []*IndustrialSubjectItem `json:"industrialSubjectList"` // 标的list
- MeetingId int64 `json:"meetingId"` // 主表id
- Content string `json:"content"` // 内容
- }
- type CygxMorningMeetingReviewChapterResp struct {
- MeetingTime string
- Status int
- List []*CygxMorningMeetingReviewChapterRespItem
- }
- func GetCygxMorningMeetingReviewsListByIndustrialIds(industrialIds string) (items []*CygxMorningMeetingReviewChapter, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_morning_meeting_review_chapter WHERE industry_id IN (` + industrialIds + `) `
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
|