【代码评审】商城:满减送订单

This commit is contained in:
YunaiV
2024-08-30 21:37:51 +08:00
parent 69d1a70900
commit 88cc4c987b
8 changed files with 19 additions and 9 deletions

View File

@@ -48,8 +48,8 @@ public class CouponApiImpl implements CouponApi {
}
@Override
public void takeBackCouponsByAdmin(Map<Long, Integer> giveCouponsMap, Long userId) {
couponService.takeBackCouponsByAdmin(giveCouponsMap, userId);
public void invalidateCouponsByAdmin(Map<Long, Integer> giveCouponsMap, Long userId) {
couponService.invalidateCouponsByAdmin(giveCouponsMap, userId);
}
}

View File

@@ -119,7 +119,7 @@ public interface CouponService {
* @param giveCouponsMap key: 优惠劵编号value对应的优惠券数量
* @param userId 用户编号
*/
void takeBackCouponsByAdmin(Map<Long, Integer> giveCouponsMap, Long userId);
void invalidateCouponsByAdmin(Map<Long, Integer> giveCouponsMap, Long userId);
/**
* 【会员】领取优惠券

View File

@@ -198,7 +198,7 @@ public class CouponServiceImpl implements CouponService {
}
@Override
public void takeBackCouponsByAdmin(Map<Long, Integer> giveCouponsMap, Long userId) {
public void invalidateCouponsByAdmin(Map<Long, Integer> giveCouponsMap, Long userId) {
// 循环收回
for (Map.Entry<Long, Integer> entry : giveCouponsMap.entrySet()) {
try {