mod
This commit is contained in:
parent
1464052697
commit
2a5678f5b0
|
@ -247,9 +247,6 @@ const (
|
|||
DBRavenIQTest = "Raven_IQ_test"
|
||||
COLRavenIQTest = "Raven_IQ_test"
|
||||
COLRavenIQTestVisit = "Raven_IQ_test_visit"
|
||||
|
||||
DBShare = "share"
|
||||
COLShareUrl = "share_url"
|
||||
)
|
||||
|
||||
// 商品表
|
||||
|
@ -651,11 +648,6 @@ func (m *Mongo) getColRavenIQTestVisit() *qmgo.Collection {
|
|||
return m.clientMix.Database(DBRavenIQTest).Collection(COLRavenIQTestVisit)
|
||||
}
|
||||
|
||||
// 商品表
|
||||
func (m *Mongo) getColShareUrl() *qmgo.Collection {
|
||||
return m.clientMix.Database(DBShare).Collection(COLShareUrl)
|
||||
}
|
||||
|
||||
// 商品相关
|
||||
func (m *Mongo) CreateProduct(ctx *gin.Context, product *dbstruct.Product) error {
|
||||
col := m.getColProduct()
|
||||
|
|
|
@ -7,6 +7,16 @@ import (
|
|||
"service/dbstruct"
|
||||
)
|
||||
|
||||
const (
|
||||
DBShare = "share"
|
||||
COLShareUrl = "share_url"
|
||||
)
|
||||
|
||||
// 商品表
|
||||
func (m *Mongo) getColShareUrl() *qmgo.Collection {
|
||||
return m.clientMix.Database(DBShare).Collection(COLShareUrl)
|
||||
}
|
||||
|
||||
// 获取有效的分享链接
|
||||
func (m *Mongo) GetValidShareUrl(ctx *gin.Context) ([]*dbstruct.ShareUrl, error) {
|
||||
list := make([]*dbstruct.ShareUrl, 0)
|
||||
|
|
Loading…
Reference in New Issue