检测数据
This commit is contained in:
@@ -121,6 +121,32 @@ type VendorStoreExcel struct {
|
||||
OperatorName3 string `json:"运营负责人3"`
|
||||
}
|
||||
|
||||
//首页展示信息
|
||||
type HomePageInfos struct {
|
||||
StoreID int `json:"storeID"` //门店ID
|
||||
StoreName string `json:"storeName"` //门店名字
|
||||
OpenTime1 int16 `json:"openTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int16 `json:"closeTime1"` // 营业时间 1
|
||||
OpenTime2 int16 `json:"openTime2"` // 营业时间2
|
||||
CloseTime2 int16 `json:"closeTime2"`
|
||||
Status int `json:"status"` //门店是否营业
|
||||
Distance int `json:"distance"` //店铺与定位 直线距离
|
||||
BrandID int `orm:"column(brand_id)" json:"brandID"` //品牌ID
|
||||
BrandName string `json:"brandName"` //品牌名字
|
||||
BrandLogo string `json:"brandLogo"` //品牌logo
|
||||
//热销商品信息
|
||||
SkuID int `json:"skuID"` //商品ID
|
||||
SkuName string `json:"skuName"` //商品名字
|
||||
SkuStatus int `json:"skuStatus"` //商品是否可售状态 1可售 0不可售
|
||||
BestSeller int `json:"bestSeller"` //畅销品 0不是 1是
|
||||
Img string `json:"img"` //商品第一张图片
|
||||
Price int `json:"price"` // 单位为分,标准价,不为份的就为实际标准价,为份的为每市斤价,实际还要乘质量
|
||||
Unit string `json:"unit"` //商品售卖单位 份/kg等
|
||||
//减运策略
|
||||
DeliveryFeeDeductionSill int `json:"deliveryFeeDeductionSill"` //订单满减金额
|
||||
DeliveryFeeDeductionFee int `json:"deliveryFeeDeductionFee"` //订单减免金额
|
||||
}
|
||||
|
||||
type JdStoreLevelExt struct {
|
||||
Level string `json:"level`
|
||||
PageNo int `json:"pageNo"`
|
||||
@@ -5629,7 +5655,7 @@ func UpdateStoreTemplate(ctx *jxcontext.Context, storeID int, content, sound str
|
||||
}
|
||||
|
||||
//条件过滤 B2B、物料店
|
||||
func FilterByB2B(locationList []*common.Store4User, token string) (retVal interface{}, errCode string, err error) {
|
||||
func FilterByB2B(locationList []*common.Store4User, token string) (retVal []*common.Store4User, errCode string, err error) {
|
||||
userAuth, err := auth2.GetTokenInfo(token)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
@@ -5680,3 +5706,23 @@ func FilterByB2B(locationList []*common.Store4User, token string) (retVal interf
|
||||
return result, "", err
|
||||
}
|
||||
}
|
||||
|
||||
//首页信息展示
|
||||
//func GetHomePageByLocation(locationList []*common.Store4User, token string) (interface{}, string, error) {
|
||||
// var (
|
||||
// //ctx *jxcontext.Context
|
||||
// )
|
||||
// // 获取用户权限,如普通用户不展示b2b相关目录,门店老板或者管理则展示全部
|
||||
// result, _, err := FilterByB2B(locationList, token)
|
||||
// if err != nil {
|
||||
// return nil, "根据用户权限过滤商店失败", err
|
||||
// }
|
||||
// for _, v := range result {
|
||||
// //获取门店信息
|
||||
// //storeInfos, err := GetStores(ctx, )
|
||||
// //获取热销商品
|
||||
// //获取满减策略
|
||||
// }
|
||||
//
|
||||
// return nil, "", nil
|
||||
//}
|
||||
|
||||
@@ -604,11 +604,7 @@ func (c *StoreController) GetHomePageByLocation() {
|
||||
return nil, "根据经纬度获取商店失败", err
|
||||
}
|
||||
if params.Token != "" {
|
||||
// 获取用户权限,如普通用户不展示b2b相关目录,门店老板或者管理则展示全部
|
||||
//result, _, err := cms.FilterByB2B(locationList, params.Token)
|
||||
if err != nil {
|
||||
return nil, "根据用户权限过滤商店失败", err
|
||||
}
|
||||
|
||||
//获取店铺基本信息
|
||||
//storeDetail := cms.GetStores(params.Ctx, params.Keyword, params.MapData, params.Offset, params.PageSize, timeList[0], timeList[1], params.OrderCountFrom, params.OrderCountTo)
|
||||
//retVal, err = cms.GetStoreVendorMaps(params.Ctx, nil, utils.Interface2String(), params.VendorID)
|
||||
|
||||
@@ -3,6 +3,7 @@ package controllers
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
|
||||
@@ -53,6 +54,7 @@ type StoreSkuController struct {
|
||||
func (c *StoreSkuController) GetStoreSkus() {
|
||||
c.callGetStoreSkus(func(params *tStoreSkuGetStoreSkusParams) (retVal interface{}, errCode string, err error) {
|
||||
var skuIDs []int
|
||||
globals.SugarLogger.Debug("检测param=============", params)
|
||||
if err = jxutils.Strings2Objs(params.SkuIDs, &skuIDs); err == nil {
|
||||
retVal, err = cms.GetStoreSkus(params.Ctx, params.StoreID, skuIDs, params.IsFocus, params.Keyword, params.IsBySku, params.IsAct, params.MapData, params.Offset, params.PageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user