From f3c03252d8f8a99013e10c1b898ce9af401e2e10 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 25 Aug 2022 17:40:08 +0800
Subject: [PATCH] 20220822
---
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
index 8389f94..14dcdcf 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
@@ -473,5 +473,27 @@
return mallGoodsMapper.getAllGoodsTree();
}
+ @Override
+ public FebsResponse goodsHot(Long id) {
+ MallGoods mallGoods = mallGoodsMapper.selectById(id);
+ if (ObjectUtil.isEmpty(mallGoods)) {
+ return new FebsResponse().fail().message("商品不存在,请刷新当前页面");
+ }
+ mallGoods.setIsHot(MallGoods.ISHOT_STATE_YES);
+ mallGoodsMapper.updateById(mallGoods);
+ return new FebsResponse().success();
+ }
+
+ @Override
+ public FebsResponse goodsNotHot(Long id) {
+ MallGoods mallGoods = mallGoodsMapper.selectById(id);
+ if (ObjectUtil.isEmpty(mallGoods)) {
+ return new FebsResponse().fail().message("商品不存在,请刷新当前页面");
+ }
+ mallGoods.setIsHot(MallGoods.ISHOT_STATE_NO);
+ mallGoodsMapper.updateById(mallGoods);
+ return new FebsResponse().success();
+ }
+
}
--
Gitblit v1.9.1