qmj 1 месяц назад
Родитель
Сommit
65fe08912b

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/app/mendian/PosStoreController.java

@@ -160,6 +160,7 @@ public class PosStoreController extends BaseController {
             posOrder.setPayType(input.getPaymentMethod());
             //设置桌号(从父订单继承)
             posOrder.setTableId(input.getTableId());
+            posOrder.setTableNo(input.getTableNo);
             posOrder.setLogo(item.getLogo());
             posOrder.setPosName(item.getPosName());
             posOrder.setJvli(item.getJvli());

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/app/order/UserOrderController.java

@@ -154,6 +154,7 @@ public class UserOrderController extends BaseController {
             posOrder.setPayType(input.getPaymentMethod());
             //设置桌号(从父订单继承)
             posOrder.setTableId(input.getTableId());
+            posOrder.setTableNo(input.getTableNo);
             posOrder.setLogo(item.getLogo());
             posOrder.setPosName(item.getPosName());
             posOrder.setJvli(item.getJvli());

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/app/order/dto/OrderCreateInput.java

@@ -37,6 +37,8 @@ public class OrderCreateInput {
 
     /** 餐桌码ID,关联 table_qrcode.id */
     private Long tableId;
+
+    private String tableNo;
     /** 整单备注 */
     private String remarks;
 

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/PosOrder.java

@@ -288,6 +288,8 @@ public class PosOrder {
      * 餐桌码ID,关联 table_qrcode.id
      */
     private Long tableId;
+
+    private String tableNo;
     /**
      * 店铺 logo
      */

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

@@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="parentDdId" column="parent_dd_id" />
         <result property="orderCategory" column="order_category" />
         <result property="tableId" column="table_id" />
+        <result property="tableNo" column="table_no" />
         <result property="logo" column="logo" />
         <result property="posName" column="pos_name" />
         <result property="foodAmount" column="food_amount" />
@@ -57,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectPosOrderVo">
-        select id, dd_id, sh_id, md_id, cretim, shdz_id, user_id,sh_address, amount, remarks, state, type, delry_time,food,yh_id,yh_name,md_yh_id,md_yh_name,md_discount_amount,jvli,freight,dining_status,qs_id,pay_url,collect_payment,activity,md_activity,kefu_state,kefu_content,kefu_repeat,repeat_dd_id,sales_name,md_sales_name,sales_reduction,md_sales_reduction,points,points_reduction,sd_time,pay_type,parent_dd_id,order_category,table_id,logo,pos_name,food_amount,pick_up_num,is_accepted,is_display,display_time from pos_order
+        select id, dd_id, sh_id, md_id, cretim, shdz_id, user_id,sh_address, amount, remarks, state, type, delry_time,food,yh_id,yh_name,md_yh_id,md_yh_name,md_discount_amount,jvli,freight,dining_status,qs_id,pay_url,collect_payment,activity,md_activity,kefu_state,kefu_content,kefu_repeat,repeat_dd_id,sales_name,md_sales_name,sales_reduction,md_sales_reduction,points,points_reduction,sd_time,pay_type,parent_dd_id,order_category,table_id,table_no,logo,pos_name,food_amount,pick_up_num,is_accepted,is_display,display_time from pos_order
     </sql>
 
     <select id="selectPosOrderList" parameterType="PosOrder" resultMap="PosOrderResult">
@@ -173,6 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentDdId != null and parentDdId != ''">parent_dd_id,</if>
             <if test="orderCategory != null and orderCategory != ''">order_category,</if>
             <if test="tableId != null">table_id,</if>
+            <if test="tableNo != null and tableNo != ''">table_no,</if>
             <if test="logo != null and logo != ''">logo,</if>
             <if test="posName != null and posName != ''">pos_name,</if>
             <if test="foodAmount != null">food_amount,</if>
@@ -210,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentDdId != null and parentDdId != ''">#{parentDdId},</if>
             <if test="orderCategory != null and orderCategory != ''">#{orderCategory},</if>
             <if test="tableId != null">#{tableId},</if>
+            <if test="tableNo != null and tableNo != ''">#{tableNo},</if>
             <if test="logo != null and logo != ''">#{logo},</if>
             <if test="posName != null and posName != ''">#{posName},</if>
             <if test="foodAmount != null">#{foodAmount},</if>
@@ -253,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentDdId != null and parentDdId != ''">parent_dd_id = #{parentDdId},</if>
             <if test="orderCategory != null and orderCategory != ''">order_category = #{orderCategory},</if>
             <if test="tableId != null">table_id = #{tableId},</if>
+            <if test="tableNo != null and tableNo != ''">table_no = #{tableNo},</if>
             <if test="logo != null and logo != ''">logo = #{logo},</if>
             <if test="posName != null and posName != ''">pos_name = #{posName},</if>
             <if test="foodAmount != null">food_amount = #{foodAmount},</if>