From ed1a41de2102d136cf625f209ad3f343ba8b6afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 10 Oct 2024 09:49:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B010.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ActiveAppletController.java | 13 ++++++++++++- .../service/ActiveAppletService.java | 8 ++++++++ .../service/impl/ActiveAppletServiceImpl.java | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java index 8a278d993..8230ae09e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java @@ -175,5 +175,16 @@ public class ActiveAppletController extends BaseController { public ResponseObject editStatus(@PathVariable Integer id) { return getSuccessResult(activeAppletService.updateActiveStatus(id)); } -} + + /** + * + * 根据storeId查询邀请有礼活动(小程序) + * @param storeId + * @return + */ + @GetMapping("getRecommendedByStoreId") + public ResponseObject getRecommendedByStoreId(Integer storeId){ + return getSuccessResult(activeAppletService.selectByStoreId(storeId)); + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java index ffb31b1ee..f072d959c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java @@ -61,5 +61,13 @@ public interface ActiveAppletService extends IService { * @return */ ActiveApplet selectByActiveId(Integer activeId,String type); + + /** + * + * 根据storeId查询邀请有礼信息 + * @param storeId + * @return + */ + ActiveApplet selectByStoreId(Integer storeId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java index 15ef55412..60d607f39 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java @@ -1,6 +1,7 @@ package com.fuint.business.marketingActivity.activeApplet.service.impl; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -199,6 +200,21 @@ public class ActiveAppletServiceImpl extends ServiceImpl() + .eq(ActiveApplet::getStoreId, storeId) + .eq(ActiveApplet::getType, "7") + .eq(ActiveApplet::getIsonline, "0") + .eq(ActiveApplet::getActiveStatus, "1")); + } + /** * 类型转换 *