zoujiajian vor 7 Monaten
Ursprung
Commit
08ffb8102f

+ 6 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/CmsGoodsDonController.java

@@ -183,7 +183,7 @@ public class CmsGoodsDonController {
             goodsDonCategoryService.handleGoodsRelate(goods.getId(), spu.getCategoryList());
             goodsDonService.updateById(goods);
             //关闭订阅提醒 且已上架
-            if (dbGoodsDon.getStatus() && (dbGoodsDon.getIsSubscribeAlert() && !spu.getIsSubscribeAlert())) {
+            if (dbGoodsDon.getStatus() && (dbGoodsDon.getIsSubscribeAlert() && spu.getIsSubscribeAlert() != null && !spu.getIsSubscribeAlert())) {
                 //通知之前 订阅该平台的用户
                 goodsSubscribeAlertService.alertBeforeSubscribeByGoodsId(spu.getId());
             }
@@ -203,6 +203,11 @@ 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());
     }