Skip to content

Commit

Permalink
【功能修复】商城:限时折扣在 activityIds、skuIds 为空时,报 SQL 不正确的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Dec 28, 2024
1 parent d49c11f commit cdb3167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ default List<DiscountProductDO> selectListByActivityId(Collection<Long> activity
return selectList(DiscountProductDO::getActivityId, activityIds);
}

default List<DiscountProductDO> selectListBySpuIdsAndStatus(Collection<Long> spuIds, Integer status) {
return selectList(new LambdaQueryWrapperX<DiscountProductDO>()
.in(DiscountProductDO::getSpuId, spuIds)
.eq(DiscountProductDO::getActivityStatus, status));
}

default void updateByActivityId(DiscountProductDO discountProductDO) {
update(discountProductDO, new LambdaUpdateWrapper<DiscountProductDO>()
.eq(DiscountProductDO::getActivityId, discountProductDO.getActivityId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,17 @@ public List<DiscountProductDO> getDiscountProductsByActivityId(Long activityId)

@Override
public List<DiscountProductDO> getDiscountProductsByActivityId(Collection<Long> activityIds) {
if (CollUtil.isEmpty(activityIds)) {
return CollUtil.newArrayList();
}
return discountProductMapper.selectList(DiscountProductDO::getActivityId, activityIds);
}

@Override
public List<DiscountProductDO> getMatchDiscountProductListBySkuIds(Collection<Long> skuIds) {
if (CollUtil.isEmpty(skuIds)) {
return CollUtil.newArrayList();
}
return discountProductMapper.selectListBySkuIdsAndStatusAndNow(skuIds, CommonStatusEnum.ENABLE.getStatus());
}

Expand Down

0 comments on commit cdb3167

Please sign in to comment.