|
|
@@ -165,6 +165,26 @@ func (Division) TableName() string {
|
|
|
return "DIVISION"
|
|
|
}
|
|
|
|
|
|
+// Szdz2imageconfig 广告配置表
|
|
|
+type Szdz2imageconfig struct {
|
|
|
+ Configid int64 `json:"configid" xorm:"'CONFIGID'" binding:"required"` // 配置ID(SEQ_SZDZ2_IMAGECONFIG)
|
|
|
+ Imagetype int32 `json:"imagetype" xorm:"'IMAGETYPE'"` // 类型 - 1:App首页轮播 2:我的
|
|
|
+ Title string `json:"title" xorm:"'TITLE'"` // 标题
|
|
|
+ Imagepath string `json:"imagepath" xorm:"'IMAGEPATH'"` // 图片
|
|
|
+ URL string `json:"url" xorm:"'URL'"` // 链接
|
|
|
+ Sort int64 `json:"sort" xorm:"'SORT'"` // 排序
|
|
|
+ Isshow int32 `json:"-" xorm:"'ISSHOW'"` // 是否展示 - 0:不展示 1:展示
|
|
|
+ Createdate time.Time `json:"-" xorm:"'CREATEDATE'"` // 创建时间
|
|
|
+ Creatorid int64 `json:"-" xorm:"'CREATORID'"` // 创建人
|
|
|
+ Updatedate time.Time `json:"-" xorm:"'UPDATEDATE'"` // 修改时间
|
|
|
+ Modifierid int64 `json:"-" xorm:"'MODIFIERID'"` // 操作人
|
|
|
+}
|
|
|
+
|
|
|
+// TableName is SZDZ2_IMAGECONFIG
|
|
|
+func (Szdz2imageconfig) TableName() string {
|
|
|
+ return "SZDZ2_IMAGECONFIG"
|
|
|
+}
|
|
|
+
|
|
|
// QuotePrimaryMenu 报价牌一级分类菜单
|
|
|
type QuotePrimaryMenu struct {
|
|
|
Index int `json:"Index"` // 序号
|
|
|
@@ -571,3 +591,20 @@ func GetProvincesAndCities(provinceID int) ([]Division, error) {
|
|
|
|
|
|
return divisions, nil
|
|
|
}
|
|
|
+
|
|
|
+// GetImageConfigs 获取轮播图配置信息
|
|
|
+func GetImageConfigs(imageType int) ([]Szdz2imageconfig, error) {
|
|
|
+ engine := db.GetEngine()
|
|
|
+
|
|
|
+ imageConfigs := make([]Szdz2imageconfig, 0)
|
|
|
+ session := engine.Where("ISSHOW = 1")
|
|
|
+ if imageType > 0 {
|
|
|
+ session = session.And("IMAGETYPE = ?", imageType)
|
|
|
+ }
|
|
|
+ session = session.Asc("SORT")
|
|
|
+ if err := session.Find(&imageConfigs); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+
|
|
|
+ return imageConfigs, nil
|
|
|
+}
|