Documentation
¶
Index ¶
- Constants
- type Tag
- type TagDB
- func (db *TagDB) DeleteTag(TagID int) error
- func (db *TagDB) GetByID(tagID int) (*Tag, error)
- func (db *TagDB) GetIndexPosition() ([]Tag, error)
- func (db *TagDB) GetStorePosition(storeID int) ([]Tag, error)
- func (db *TagDB) InsertTag(c *TagParam) (int, error)
- func (db *TagDB) List(tagType, tagState string, storeID int) ([]Tag, error)
- func (db *TagDB) ListIndex() ([]Tag, error)
- func (db *TagDB) ListOnlineStore(storeID int) ([]Tag, error)
- func (db *TagDB) ListStore(storeID int) ([]Tag, error)
- func (db *TagDB) UpdateOffline(TagID int) error
- func (db *TagDB) UpdateOnline(TagID int) error
- func (db *TagDB) UpdateTag(c *TagParam) error
- type TagParam
- type TagTx
Constants ¶
View Source
const ( // TagTypeGoods 商品类型标签 TagTypeGoods = "GOODS" // TagStateOnline 上架状态 TagStateOnline = "ONLINE" // TagStateOffline 下架状态 TagStateOffline = "OFFLINE" // TagPositionIndex 位置首页 TagPositionIndex = "INDEX" // TagPositionStore 位置店铺 TagPositionStore = "STORE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tag ¶
type Tag struct { TagID int `json:"tagID" db:"tag_id"` // 标签ID Active bool `json:"active" db:"active"` // 是否有效 TagState string `json:"tagState" db:"tag_state"` // Tag状态 TagType string `json:"tagType" db:"tag_type"` // 标签类型 Label string `json:"label" db:"label"` // 标签名称 Icon string `json:"icon" db:"icon"` // 标签图标 Position string `json:"position" db:"position"` // 标签位置INDEX首页,STORE店铺 StoreID int `json:"storeID" db:"store_id"` // 店铺ID Weight int `json:"weight" db:"weight"` // 权重 CreateTime time.Time `json:"createTime" db:"create_time"` // 创建时间 UpdateTime time.Time `json:"updateTime" db:"update_time"` // 更新时间 }
Tag 标签
type TagDB ¶
func (*TagDB) GetIndexPosition ¶
GetIndexPosition 获取首页标签
func (*TagDB) GetStorePosition ¶
GetStorePosition 获取店铺标签
func (*TagDB) List ¶
List 列出所有有效标签,按照权重和创建开始时间排序
func (*TagDB) ListIndex ¶
ListIndex 列出首页标签,按照权重和创建开始时间排序
func (*TagDB) ListOnlineStore ¶
ListOnlineStore 列出店铺上架标签
func (*TagDB) ListStore ¶
ListStore 列出店铺标签,按照权重和创建开始时间排序
type TagParam ¶
type TagParam struct { TagID int `json:"tagID" form:"tagID"` // 标签ID TagType string `json:"tagType" form:"tagType"` // 标签类型 Label string `json:"label" form:"label"` // 标签名称 Icon string `json:"icon" form:"icon"` // 标签图标 Position string `json:"position" form:"position"` // 标签位置INDEX首页,STORE店铺 StoreID int `json:"storeID" form:"store_id"` // 店铺ID Weight int `json:"weight" form:"weight"` // 权重 }
TagParam 标签
Click to show internal directories.
Click to hide internal directories.