This commit is contained in:
邹宗楠
2023-04-13 14:52:22 +08:00
parent 17c794ae51
commit eccfb45dc6
3 changed files with 3 additions and 2 deletions

View File

@@ -3738,6 +3738,7 @@ func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (storeSkuNameE
return storeSkuNameExt2, err
}
// GetTopSkusByCityCode 获取当前城市订单销量前一百的商品,排除掉商户已经可售的商品剩下的为热销推荐
func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNameAndPlaceList []*dao.SkuNameAndPlace, err error) {
db := dao.GetDB()
store, err := dao.GetStoreDetail(db, storeID, -1, "")

View File

@@ -1285,7 +1285,7 @@ func GetTopSkusByCityCode(db *DaoDB, cityCode int, orderCreate time.Time) (skuNa
AND b.sale_price > ?
AND a.order_created_at BETWEEN ? and NOW()
GROUP BY 2,3,4
ORDER BY count DESC
ORDER BY count DESC LIMIT 100
`
sqlParams := []interface{}{
utils.DefaultTimeValue,

View File

@@ -145,7 +145,7 @@ func buildAfsOrder(msg *CallbackMsg) (outAfsOrder *model.AfsOrder, err error) {
}
// 最后一个商品
if len(skuList) == len(refundFinancial)+len(afsOrder.Skus) {
if len(skuList) == len(refundFinancial)+len(afsOrder.Skus) && len(skuList) != model.YES {
return nil, errors.New("如需整单退款,请使用整单退,无法分批次整单退款")
}