From cc505465f1a013aa8b62dad495d17f1155e004f8 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Thu, 14 Dec 2023 10:47:07 +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