限时折扣商品问题
This commit is contained in:
@@ -93,7 +93,7 @@ public class MkLimitTimeDiscountServiceImpl extends ServiceImpl<MkLimitTimeDisco
|
|||||||
public MkLimitTimeDiscount getLimitTimeDiscountByShopId(Long shopId) {
|
public MkLimitTimeDiscount getLimitTimeDiscountByShopId(Long shopId) {
|
||||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||||
MkLimitTimeDiscount limitTimeDiscount = mapper.selectOneByShopId(mainShopId, shopId, CzgStrUtils.getStrWeek());
|
MkLimitTimeDiscount limitTimeDiscount = mapper.selectOneByShopId(mainShopId, shopId, CzgStrUtils.getStrWeek());
|
||||||
if (limitTimeDiscount != null && limitTimeDiscount.getFoodType() == 2 && StrUtil.isNotBlank(limitTimeDiscount.getFoods())) {
|
if (limitTimeDiscount != null && limitTimeDiscount.getFoodType() == 2 && StrUtil.isNotBlank(limitTimeDiscount.getFoods()) && !shopId.equals(mainShopId)) {
|
||||||
List<String> foodIds = Arrays.stream(limitTimeDiscount.getFoods().split(","))
|
List<String> foodIds = Arrays.stream(limitTimeDiscount.getFoods().split(","))
|
||||||
.map(String::trim)
|
.map(String::trim)
|
||||||
.filter(StrUtil::isNotBlank)
|
.filter(StrUtil::isNotBlank)
|
||||||
|
|||||||
Reference in New Issue
Block a user