소스 검색

会议预约,订餐预定

Administrator 10 달 전
부모
커밋
07ffbd368a

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/OrderFoodMapper.java

@@ -26,6 +26,7 @@ public interface OrderFoodMapper
      * @return 订餐预约集合
      */
     public List<OrderFood> selectOrderFoodList(OrderFood orderFood);
+    public List<OrderFood> selectOrderFoodListR(OrderFood orderFood);
 
     /**
      * 新增订餐预约

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/OrderFoodServiceImpl.java

@@ -100,7 +100,7 @@ public class OrderFoodServiceImpl implements IOrderFoodService {
         orderFoodNew.setOrderFoodUserId(userId);
         orderFoodNew.setOrderFoodType(orderFood.getOrderFoodType());
         orderFoodNew.setOrderFoodTime(orderFood.getOrderFoodTime());
-        List<OrderFood> orderFoods = orderFoodMapper.selectOrderFoodList(orderFoodNew);
+        List<OrderFood> orderFoods = orderFoodMapper.selectOrderFoodListR(orderFoodNew);
         if (orderFoods != null && orderFoods.size() > 0) {
             return AjaxResult.error("请勿重复预约");
         }
@@ -129,7 +129,7 @@ public class OrderFoodServiceImpl implements IOrderFoodService {
         orderFoodNew.setOrderFoodUserId(userId);
         orderFoodNew.setOrderFoodType(orderFood.getOrderFoodType());
         orderFoodNew.setOrderFoodTime(orderFood.getOrderFoodTime());
-        List<OrderFood> orderFoods = orderFoodMapper.selectOrderFoodList(orderFoodNew);
+        List<OrderFood> orderFoods = orderFoodMapper.selectOrderFoodListR(orderFoodNew);
         if (orderFoods != null && orderFoods.size() > 0) {
             return AjaxResult.error("请勿重复预约");
         }

+ 1 - 1
ruoyi-system/src/main/resources/mapper/system/ConferenceRoomOrderMapper.xml

@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectConferenceRoomOrderVo"/>
         <where>
             <if test="conferenceRoomId != null "> and conference_room_id = #{conferenceRoomId}</if>
-            <if test="startTime != null "> and start_time &lt; #{endTime}</if>
+            <if test="startTime != null "> and #{startTime} &lt; end_time</if>
         </where>
     </select>
     

+ 16 - 0
ruoyi-system/src/main/resources/mapper/system/OrderFoodMapper.xml

@@ -39,6 +39,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by order_food_time desc
     </select>
+
+    <select id="selectOrderFoodListR" parameterType="OrderFood" resultMap="OrderFoodResult">
+        <include refid="selectOrderFoodVo"/>
+        <where>
+            <if test="orderFoodTime != null"><!-- 开始时间检索 -->
+                AND date_format(order_food_time,'%Y%m%d') = date_format(#{orderFoodTime},'%Y%m%d')
+            </if>
+            <if test="orderFoodType != null  and orderFoodType != ''"> and order_food_type = #{orderFoodType}</if>
+            <if test="orderFoodUser != null  and orderFoodUser != ''"> and order_food_user = #{orderFoodUser}</if>
+            <if test="orderFoodUserId != null "> and order_food_user_id = #{orderFoodUserId}</if>
+            <if test="orderFoodDept != null  and orderFoodDept != ''"> and order_food_dept = #{orderFoodDept}</if>
+            <if test="orderFoodDeptId != null "> and order_food_dept_id = #{orderFoodDeptId}</if>
+            <if test="createDept != null "> and create_dept = #{createDept}</if>
+        </where>
+        order by order_food_time desc
+    </select>
     
     <select id="selectOrderFoodByOrderFoodId" parameterType="Long" resultMap="OrderFoodResult">
         <include refid="selectOrderFoodVo"/>