电子券
This commit is contained in:
parent
731d53e3e2
commit
34ad213801
|
|
@ -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<Long> canteenIdSet) {
|
||||
// return this.allocCanteenMapper.getCanteenNameByIdSet(canteenIdSet);
|
||||
// }
|
||||
//
|
||||
|
||||
public String getCanteenNameByIdSet(Set<Long> canteenIdSet) {
|
||||
return this.allocCanteenMapper.getCanteenNameByIdSet(canteenIdSet);
|
||||
}
|
||||
|
||||
// public boolean checkCanteenIfReserve(Long canteenId, Long stallId) {
|
||||
// return this.allocCanteenService.checkCanteenIfReserve(canteenId, stallId);
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -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<AllocCanteen> {
|
||||
|
|
@ -18,4 +19,6 @@ public interface AllocCanteenMapper extends BaseMapper<AllocCanteen> {
|
|||
|
||||
@Select({"SELECT area_id FROM alloc_canteen WHERE canteen_id = #{canteenId}"})
|
||||
Long getAreaId(Long canteenId);
|
||||
|
||||
String getCanteenNameByIdSet(@Param("canteenIdSet") Set<Long> canteenIdSet);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,4 +12,16 @@
|
|||
#{areaId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 通过食堂id列表获取食堂名称 -->
|
||||
<select id="getCanteenNameByIdSet" resultType="java.lang.String">
|
||||
SELECT
|
||||
GROUP_CONCAT(canteen_name SEPARATOR ',') AS canteenName
|
||||
FROM
|
||||
alloc_canteen
|
||||
WHERE canteen_id in
|
||||
<foreach collection="canteenIdSet" item="canteenId" separator="," open="(" close=")">
|
||||
#{canteenId}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue