zoujiajian 7 月之前
父節點
當前提交
05acb899e2

+ 2 - 7
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonController.java

@@ -182,8 +182,8 @@ public class CmsGoodsDonController {
             //平台 分类关系
             goodsDonCategoryService.handleGoodsRelate(goods.getId(), spu.getCategoryList());
             goodsDonService.updateById(goods);
-            //关闭订阅提醒 且已上架
-            if (dbGoodsDon.getStatus() && (dbGoodsDon.getIsSubscribeAlert() && spu.getIsSubscribeAlert() != null && !spu.getIsSubscribeAlert())) {
+            //之前开启订阅 后再次关闭 发送提醒
+            if (dbGoodsDon.getIsSubscribeAlert() && spu.getIsSubscribeAlert() != null && !spu.getIsSubscribeAlert()) {
                 //通知之前 订阅该平台的用户
                 goodsSubscribeAlertService.alertBeforeSubscribeByGoodsId(spu.getId());
             }
@@ -203,11 +203,6 @@ public class CmsGoodsDonController {
         }
         goods.setStatus(!goods.getStatus());
         goodsDonService.updateById(goods);
-        //关闭订阅提醒 且已上架
-        if (goods.getStatus() && !goods.getIsSubscribeAlert()) {
-            //通知之前 订阅该平台的用户
-            goodsSubscribeAlertService.alertBeforeSubscribeByGoodsId(goods.getId());
-        }
         refreshCacheService.refreshYhHomePageCache();
         return GatewayResponse.SUCCESS.newBuilder().toResult(goods.getStatus());
     }

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonSkuController.java

@@ -188,8 +188,8 @@ public class CmsGoodsDonSkuController {
             goodsDonSkuService.setBelowPriceShopSkuDown(skuId, newPrice);
             //套餐包关联规格
             goodsDonSkuService.handleGptPackageSku(dbSku, sku);
-            //关闭订阅提醒 且已上架
-            if (sku.getStatus() && (dbIsSubscribeAlert && !sku.getIsSubscribeAlert())) {
+            //之前开启订阅 后再次关闭 发送提醒
+            if (dbIsSubscribeAlert && !sku.getIsSubscribeAlert()) {
                 //通知之前 订阅该平台的用户
                 goodsSubscribeAlertService.alertBeforeSubscribeBySkuId(sku.getId());
             }