From 34ad213801b034749e89a5f673f27387826ebfbf Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 19 May 2025 18:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E5=AD=90=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/allocation/api/AllocCanteenApi.java | 16 +++++++++------- .../canteen/mapper/AllocCanteenMapper.java | 3 +++ .../mapper/alloc/canteen/AllocCanteenMapper.xml | 12 ++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocCanteenApi.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocCanteenApi.java index 5944fb75..9eb09c66 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocCanteenApi.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocCanteenApi.java @@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.bonus.canteen.core.allocation.canteen.mapper.AllocCanteenMapper; import com.bonus.canteen.core.common.enums.AllocBusinessStateEnum; import com.bonus.canteen.core.order.utils.LeNumUtil; import com.bonus.common.core.exception.ServiceException; @@ -22,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; +import javax.annotation.Resource; import java.time.LocalTime; import java.util.List; import java.util.Set; @@ -38,8 +40,8 @@ public class AllocCanteenApi { @Autowired @Lazy private AllocCanteenService allocCanteenService; -// @Resource -// private AllocCanteenMapper allocCanteenMapper; + @Resource + private AllocCanteenMapper allocCanteenMapper; // @Resource // private AllocStallService allocStallService; @Autowired @@ -143,11 +145,11 @@ public class AllocCanteenApi { // public AllocMealLine queryFirstMealLine() { // return (AllocMealLine)this.allocMealLineService.getBaseMapper().selectOne((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(AllocMealLine.class).orderByDesc(AllocMealLine::getCrtime)).last("limit 1")); // } -// -// public String getCanteenNameByIdSet(Set canteenIdSet) { -// return this.allocCanteenMapper.getCanteenNameByIdSet(canteenIdSet); -// } -// + + public String getCanteenNameByIdSet(Set canteenIdSet) { + return this.allocCanteenMapper.getCanteenNameByIdSet(canteenIdSet); + } + // public boolean checkCanteenIfReserve(Long canteenId, Long stallId) { // return this.allocCanteenService.checkCanteenIfReserve(canteenId, stallId); // } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocCanteenMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocCanteenMapper.java index cd20da90..025be5b9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocCanteenMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocCanteenMapper.java @@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; +import java.util.Set; @Mapper public interface AllocCanteenMapper extends BaseMapper { @@ -18,4 +19,6 @@ public interface AllocCanteenMapper extends BaseMapper { @Select({"SELECT area_id FROM alloc_canteen WHERE canteen_id = #{canteenId}"}) Long getAreaId(Long canteenId); + + String getCanteenNameByIdSet(@Param("canteenIdSet") Set canteenIdSet); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocCanteenMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocCanteenMapper.xml index ed2a2f41..9e2dfa82 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocCanteenMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocCanteenMapper.xml @@ -12,4 +12,16 @@ #{areaId} + + +