电子券
This commit is contained in:
parent
34ad213801
commit
f3be86d895
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
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.core.exception.ServiceException;
|
||||||
import com.bonus.common.houqin.constant.LeConstants;
|
import com.bonus.common.houqin.constant.LeConstants;
|
||||||
import com.bonus.canteen.core.allocation.canteen.model.AllocStall;
|
import com.bonus.canteen.core.allocation.canteen.model.AllocStall;
|
||||||
|
|
@ -27,6 +28,8 @@ public class AllocStallApi {
|
||||||
@Resource
|
@Resource
|
||||||
@Lazy
|
@Lazy
|
||||||
private AllocStallService allocStallService;
|
private AllocStallService allocStallService;
|
||||||
|
@Resource
|
||||||
|
private AllocStallMapper allocStallMapper;
|
||||||
|
|
||||||
public AllocStall getAllocStall(Long stallId) {
|
public AllocStall getAllocStall(Long stallId) {
|
||||||
return this.allocStallService.getAllocStallCache(stallId);
|
return this.allocStallService.getAllocStallCache(stallId);
|
||||||
|
|
@ -60,4 +63,8 @@ public class AllocStallApi {
|
||||||
return this.allocStallService.list(Wrappers.lambdaQuery(AllocStall.class)
|
return this.allocStallService.list(Wrappers.lambdaQuery(AllocStall.class)
|
||||||
.in(AllocStall::getStallId, stallIdList).eq(AllocStall::getIfDel, LeConstants.COMMON_NO));
|
.in(AllocStall::getStallId, stallIdList).eq(AllocStall::getIfDel, LeConstants.COMMON_NO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getStallNameByIdSet(Set<Long> stallIdSet) {
|
||||||
|
return this.allocStallMapper.getStallNameByIdSet(stallIdSet);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,12 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface AllocStallMapper extends BaseMapper<AllocStall> {
|
public interface AllocStallMapper extends BaseMapper<AllocStall> {
|
||||||
@Select({"SELECT stall_id, stall_name FROM alloc_stall WHERE if_del = 2 AND canteen_id = #{canteenId}"})
|
@Select({"SELECT stall_id, stall_name FROM alloc_stall WHERE if_del = 2 AND canteen_id = #{canteenId}"})
|
||||||
List<AllocCanteenStallVO.StallVO> listAllCanteenStall(@Param("canteenId") Long canteenId);
|
List<AllocCanteenStallVO.StallVO> listAllCanteenStall(@Param("canteenId") Long canteenId);
|
||||||
|
|
||||||
|
String getStallNameByIdSet(@Param("stallIdSet") Set<Long> stallIdSet);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.bonus.canteen.core.allocation.canteen.mapper.AllocStallMapper">
|
||||||
|
|
||||||
|
<!-- 通过档口id列表获取档口名称 -->
|
||||||
|
<select id="getStallNameByIdSet" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(stall_name SEPARATOR ',') AS stallName
|
||||||
|
FROM
|
||||||
|
alloc_stall
|
||||||
|
WHERE stall_id in
|
||||||
|
<foreach collection="stallIdSet" item="stallId" separator="," open="(" close=")">
|
||||||
|
#{stallId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue