|
|
|
@ -72,7 +72,7 @@ type queryListParam struct {
|
|
|
|
|
ThirdPartyState uint `json:"third_party_state"` //接口拉取的产品,1上架,2下架
|
|
|
|
|
CommissionRateStart float64 `json:"commission_rate"` //传入的佣金最小值
|
|
|
|
|
CommissionRateEnd float64 `json:"commission_rate_end"` //传入的佣金最大值
|
|
|
|
|
|
|
|
|
|
IsSale bool `json:"is_sale"`
|
|
|
|
|
}
|
|
|
|
|
type export struct {
|
|
|
|
|
GoodsId string `json:"goods_id"`
|
|
|
|
@ -210,14 +210,16 @@ func QueryGoodsList(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
var total uint
|
|
|
|
|
var goodsList []goods.Information
|
|
|
|
|
dbc.DB.Table((&goods.Information{}).TableName()).Where(where1).Where(where2).Where(where3).Where(where4).Where(where5).Where(where6).Where(goods.Information{
|
|
|
|
|
dbc.DB.Table((&goods.Information{}).TableName()).Where("is_sale=?", p.IsSale).
|
|
|
|
|
Where(where1).Where(where2).Where(where3).Where(where4).Where(where5).Where(where6).Where(goods.Information{
|
|
|
|
|
BrandID: p.BrandID,
|
|
|
|
|
VendorID: p.VendorID,
|
|
|
|
|
FirstCategoryID: p.FirstCateID,
|
|
|
|
|
SecondCategoryID: p.SecondCateID,
|
|
|
|
|
}).Count(&total)
|
|
|
|
|
|
|
|
|
|
dbc.DB.Limit(limit).Offset(limit*p.Page).Where(where1).Where(where2).Where(where3).Where(where4).Where(where5).Where(where6).Find(&goodsList, goods.Information{
|
|
|
|
|
dbc.DB.Limit(limit).Offset(limit*p.Page).Where("is_sale=?", p.IsSale).
|
|
|
|
|
Where(where1).Where(where2).Where(where3).Where(where4).Where(where5).Where(where6).Find(&goodsList, goods.Information{
|
|
|
|
|
BrandID: p.BrandID,
|
|
|
|
|
VendorID: p.VendorID,
|
|
|
|
|
FirstCategoryID: p.FirstCateID,
|
|
|
|
|