|
|
@@ -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());
|
|
|
}
|