From 7655547b449a79a9330fd03440a616b3d6ef8362 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 14 Mar 2023 14:30:10 +0800
Subject: [PATCH] 代理商补贴,线下服务中心补贴,平级奖励补贴

---
 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