点单智能推荐 间隔时间

This commit is contained in:
2025-10-23 10:39:30 +08:00
parent fbd98b52a5
commit 5d7687830b
6 changed files with 25 additions and 8 deletions

View File

@@ -23,6 +23,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 点单智能推荐 服务层实现。
@@ -46,13 +47,14 @@ public class MkProductSmartSuggestServiceImpl extends ServiceImpl<MkProductSmart
}
@Override
public List<MkProductSmartSuggest> getProductSmartSuggestByShopId(Long shopId) {
public Map<String, Object> getProductSmartSuggestByShopId(Long shopId) {
ShopInfo shopInfo = shopInfoService.getById(shopId);
AssertUtil.isNull(shopInfo, "店铺不存在");
if (shopInfo.getIsProductSuggest() == null || shopInfo.getIsProductSuggest() == 0) {
return null;
}
return mapper.selectListByShopId(shopId, CzgStrUtils.getStrWeek());
List<MkProductSmartSuggest> suggests = mapper.selectListByShopId(shopId, CzgStrUtils.getStrWeek());
return Map.of("suggestTime", shopInfo.getSuggestTime(), "list", suggests);
}
@Override