12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type ActivityType struct {
- ActivityTypeId int `description:"活动类型id"`
- ActivityTypeName string `description:"活动名称"`
- ShowType string `description:"人数限制类型,1不展示限制,2可选限制,3强制限制"`
- IsChoose bool `description:"是否选择"`
- OnlineIco string `description:"线上线下Ico图标"`
- }
- type ActivityTypeListResp struct {
- List []*ActivityType
- }
- // 列表
- func GetActivityTypeList(condition string) (items []*ActivityType, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_activity_type WHERE 1= 1 ` + condition + ` ORDER BY sort DESC`
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
- func GetActivityTypeDetailById(activityTypeId int) (item *ActivityType, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_activity_type WHERE activity_type_id = ? `
- err = o.Raw(sql, activityTypeId).QueryRow(&item)
- return
- }
- type ActivityTypeListHomeResp struct {
- List []*ActivityTypeHome
- }
- type ActivityTypeHome struct {
- ActivityTypeId int `description:"活动类型id"`
- Resource int `description:"来源 ,1:活动 ,2:专项产业调研"`
- ActivityTypeName string `description:"活动类型名称"`
- OnlineIco string `description:"线上线下Ico图标"`
- ImgUrlBgPc string `description:"Pc端背景图片"`
- List []*CygxActivityLabelList
- }
- // 活动详情
- type CygxActivityLabelList struct {
- KeyWord string `orm:"column(label)";description:"主题"`
- ImgUrlBg string `description:"背景图片"`
- ActivityId int `description:"活动ID "`
- Resource int `description:"来源 ,1:活动 ,2:专项产业调研"`
- IsNew bool `description:"是否为新:活动存在关联的的产业所关联的报告均在3个月内/无报告则标记新"`
- YidongActivityId int `description:"易董活动ID"`
- IsExternalLabel bool `description:"是否为外部资源"`
- IsResearchPoints bool `description:"是否为研选扣点"`
- IsShowSubjectName int `description:"小程序内是否展示标的名称 1是 ,0否 默认0 "`
- TemporaryLabel string `description:"临时标签"`
- TripStatus int `description:"行程进行状态 1:预报名,2:确定行程"`
- City string `description:"城市"`
- Days int `description:"天数"`
- IsResearch bool `description:"是否属于研选"`
- }
- // 列表
- func GetActivityTypeHomeList(condition string) (items []*ActivityTypeHome, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_activity_type WHERE activity_type_id != 7 ` + condition + ` ORDER BY sort DESC`
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
- type ActivityCcustomerType struct {
- CustomerTypeId int `description:"活动类型id"`
- CustomerName string `description:"活动名称"`
- PermissionValue string `description:"用户权限对应的值"`
- }
- // 列表
- func GetActivityCcustomerTypeList() (items []*ActivityCcustomerType, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_customer_type ORDER BY sort DESC`
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
|