ZhangShuling пре 2 недеља
родитељ
комит
5678c2f189

+ 17 - 0
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/dal/dataobject/order/TradeVisitorDO.java

@@ -174,4 +174,21 @@ public class TradeVisitorDO extends TenantBaseDO {
 
 
     @Schema(description = "楼层", example = "")
     @Schema(description = "楼层", example = "")
     private Integer floor;
     private Integer floor;
+
+
+    /**
+     * 入住类型
+     * 1:实际入住 2:临时入住 3:预分房
+     */
+    @Schema(description = "入住类型", example = "")
+    @TableField(exist = false)
+    private String occupancyType;
+
+    @Schema(description = "是否独居")
+    @TableField(exist = false)
+    private Integer isAlone;
+
+    @Schema(description = "是否具备同住关系", example = "")
+    @TableField(exist = false)
+    private Integer isHaveTogethers;
 }
 }

+ 6 - 8
ship-module-trade/ship-module-trade-biz/src/main/resources/mapper/order/TradeVisitorMapper.xml

@@ -206,21 +206,19 @@
     <select id="selectListByVoyageId" resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
     <select id="selectListByVoyageId" resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
         select tv.*,if(pprmt.total_num &gt;=2 and pprmt.enable_share=0,1,0) as isHaveTogethers,if(pprmt.total_num =1 and pprmt.enable_share=0,1,0) as isAlone
         select tv.*,if(pprmt.total_num &gt;=2 and pprmt.enable_share=0,1,0) as isHaveTogethers,if(pprmt.total_num =1 and pprmt.enable_share=0,1,0) as isAlone
         from trade_visitor tv
         from trade_visitor tv
-                 join trade_order to1 on tv.order_id=to1.id
-                 join trade_order_room_model torm on tv.room_index_id=torm.room_index_id
-                 join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id
-        where to1.voyage_id=#{voyageId} and to1.order_status=6
-            join trade_order to1 on tv.order_id=to1.id and to1.deleted=0
-            join trade_order_room_model torm on tv.room_index_id=torm.room_index_id and torm.deleted=0
-            join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id and pprmt.deleted=0
+                 join trade_order to1 on tv.order_id=to1.id and to1.deleted=0
+                 join trade_order_room_model torm on tv.room_index_id=torm.room_index_id and torm.deleted=0
+                 join product_price_room_model_type pprmt on torm.room_model_type_id = pprmt.id and pprmt.deleted=0
         where to1.voyage_id=#{voyageId} and to1.order_status=6 and tv.deleted=0
         where to1.voyage_id=#{voyageId} and to1.order_status=6 and tv.deleted=0
+          and tv.room_index_id is not null
+          and tv.room_model_id is not null
+          and tv.floor is not null
     </select>
     </select>
 
 
     <select id="selectListByVoyageIdAndRoomId"
     <select id="selectListByVoyageIdAndRoomId"
             resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
             resultType="com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO">
         select tv.*
         select tv.*
         from trade_visitor tv
         from trade_visitor tv
-                 join trade_order b on tv.order_id=b.id
                  join trade_order b on tv.order_id=b.id and b.deleted=0
                  join trade_order b on tv.order_id=b.id and b.deleted=0
         where b.order_status=6 and b.voyage_id=#{voyageId} and if(tv.final_room_id is null,tv.init_room_id,tv.final_room_id)=#{roomId}
         where b.order_status=6 and b.voyage_id=#{voyageId} and if(tv.final_room_id is null,tv.init_room_id,tv.final_room_id)=#{roomId}
     </select>
     </select>