From a156ddbb26693b8040f9dbbd7582a12c1fc8d61b Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 07 十一月 2024 17:04:47 +0800
Subject: [PATCH] 预约序号
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queuesequence/QueueSequenceMapper.java | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queuesequence/QueueSequenceMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queuesequence/QueueSequenceMapper.java
index de7fafc..28c6e84 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queuesequence/QueueSequenceMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queuesequence/QueueSequenceMapper.java
@@ -6,9 +6,8 @@
import cn.lihu.jh.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.lihu.jh.framework.mybatis.core.mapper.BaseMapperX;
import cn.lihu.jh.module.ecg.dal.dataobject.queuesequence.QueueSequenceDO;
-import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.*;
import cn.lihu.jh.module.ecg.controller.admin.queuesequence.vo.*;
-import org.apache.ibatis.annotations.Update;
/**
* 褰撳ぉ搴忓彿 Mapper
@@ -33,4 +32,15 @@
@Update("truncate table lihu.queue_sequence")
void clearQueueSequenceTable();
-}
\ No newline at end of file
+ @Select("select queue_no from lihu.queue_sequence where check_type=#{checkType} and time_slot=#{timeslot} and queue_no < queue_full for update; ")
+ Integer selectQueueNoForUpdate(@Param("checkType") Integer checkType, @Param("timeslot") Integer timeslot);
+
+ @Update("update lihu.queue_sequence set queue_no = queue_no + 1 where check_type=#{checkType} and time_slot=#{timeslot} and queue_no=#{curQueueNo} and queue_no < queue_full; ")
+ Integer updateGivenCheckTypeTimeslotSeqNo(@Param("checkType") Integer checkType, @Param("timeslot") Integer timeslot, @Param("curQueueNo") Integer curQueueNo);
+
+ @Select("select queue_vip_no from lihu.queue_sequence where check_type=#{checkType} and time_slot=#{timeslot} and queue_no < queue_full for update; ")
+ Integer selectQueueVipNoForUpdate(@Param("checkType") Integer checkType, @Param("timeslot") Integer timeslot);
+
+ @Update("update lihu.queue_sequence set queue_vip_no = queue_vip_no + 1 where check_type=#{checkType} and time_slot=#{timeslot} and queue_vip_no=#{curQueueVipNo} and queue_vip_no < queue_vip_full; ")
+ Integer updateGivenCheckTypeTimeslotVipSeqNo(@Param("checkType") Integer checkType, @Param("timeslot") Integer timeslot, @Param("curQueueVipNo") Integer curQueueVipNo);
+}
--
Gitblit v1.9.3