This commit is contained in:
邹宗楠
2023-04-12 15:10:57 +08:00
parent 866b9ab96f
commit 9a193d6b92
4 changed files with 46 additions and 6 deletions

View File

@@ -3740,6 +3740,11 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE
func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNameAndPlaceList []*dao.SkuNameAndPlace, err error) {
db := dao.GetDB()
store, err := dao.GetStoreDetail(db, storeID, -1, "")
if err != nil {
return nil, err
}
cityCode = store.CityCode
orderCreate := time.Now().AddDate(0, -1, 0)
var skuNameAndPlace []*dao.SkuNameAndPlace
if cityCode > 0 {
@@ -3779,10 +3784,7 @@ func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNam
for _, v := range skuNameList {
skuNameMap[v.ID] = v
}
store, err := dao.GetStoreDetail(db, storeID, -1, "")
if err != nil {
return nil, err
}
var payPercentage int
if store.PayPercentage < 50 {
payPercentage = 70