diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocStallApi.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocStallApi.java index abc7e28a..a4fa4ae8 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocStallApi.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/api/AllocStallApi.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.AllocStallMapper; import com.bonus.common.core.exception.ServiceException; import com.bonus.common.houqin.constant.LeConstants; import com.bonus.canteen.core.allocation.canteen.model.AllocStall; @@ -27,6 +28,8 @@ public class AllocStallApi { @Resource @Lazy private AllocStallService allocStallService; + @Resource + private AllocStallMapper allocStallMapper; public AllocStall getAllocStall(Long stallId) { return this.allocStallService.getAllocStallCache(stallId); @@ -60,4 +63,8 @@ public class AllocStallApi { return this.allocStallService.list(Wrappers.lambdaQuery(AllocStall.class) .in(AllocStall::getStallId, stallIdList).eq(AllocStall::getIfDel, LeConstants.COMMON_NO)); } + + public String getStallNameByIdSet(Set stallIdSet) { + return this.allocStallMapper.getStallNameByIdSet(stallIdSet); + } } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocStallMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocStallMapper.java index 1f4086e7..0cecb06e 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocStallMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/mapper/AllocStallMapper.java @@ -8,9 +8,12 @@ import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; +import java.util.Set; @Mapper public interface AllocStallMapper extends BaseMapper { @Select({"SELECT stall_id, stall_name FROM alloc_stall WHERE if_del = 2 AND canteen_id = #{canteenId}"}) List listAllCanteenStall(@Param("canteenId") Long canteenId); + + String getStallNameByIdSet(@Param("stallIdSet") Set stallIdSet); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocStallMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocStallMapper.xml new file mode 100644 index 00000000..e3342a0a --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/alloc/canteen/AllocStallMapper.xml @@ -0,0 +1,17 @@ + + + + + + + +