|
|
|
@ -1,13 +1,14 @@
|
|
|
|
|
package goods
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"git.oa00.com/go/mysql"
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
"recook/internal/back"
|
|
|
|
|
"recook/internal/dbc"
|
|
|
|
|
"recook/internal/model/goods"
|
|
|
|
|
"recook/internal/v2/model/recommendedlist"
|
|
|
|
|
"recook/tools"
|
|
|
|
|
|
|
|
|
|
"git.oa00.com/go/mysql"
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type UserParam struct {
|
|
|
|
@ -63,6 +64,7 @@ func QueryHotSellGoodsList(c *gin.Context) {
|
|
|
|
|
type ql struct {
|
|
|
|
|
Status uint `json:"status"`
|
|
|
|
|
UserID uint `json:"user_id"`
|
|
|
|
|
IsSale bool `json:"is_sale"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func QueryRecommendList(c *gin.Context) {
|
|
|
|
@ -77,7 +79,8 @@ func QueryRecommendList(c *gin.Context) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var goodsList []goods.Information
|
|
|
|
|
sub := mysql.Db.Table((&recommendedlist.RecookCommendList{}).TableName()).Select("goods_id").Where("status = ?", p.Status)
|
|
|
|
|
sub := mysql.Db.Table((&recommendedlist.RecookCommendList{}).TableName()).
|
|
|
|
|
Where("is_sale=?", p.IsSale).Select("goods_id").Where("status = ?", p.Status)
|
|
|
|
|
mysql.Db.Find(&goodsList, "id in (?)", sub)
|
|
|
|
|
list := GetGoodsRespByInfoList(goodsList, p.UserID, false)
|
|
|
|
|
back.Suc(c, "", list)
|
|
|
|
|