gqx 2 rokov pred
rodič
commit
d611b3bad6

+ 9 - 6
jeecg-mall-api/src/main/java/interceptor/ThirdSessionInterceptor.java

@@ -48,12 +48,15 @@ public class ThirdSessionInterceptor implements HandlerInterceptor {
 //		if (!(handler instanceof HandlerMethod)) {
 //			return super.preHandle(request, response, handler);
 //		}
-		HandlerMethod method = (HandlerMethod) handler;
-		//判断访问的control是否添加ApiLogin注解
-		ApiLogin apiLogin = method.getMethodAnnotation(ApiLogin.class);
-		String appIdHeader = request.getHeader("app-id");
-		//小程序端的所有接口需要登录才能访问,校验thirdSession
-		return this.judeSession(request, response, apiLogin);
+		if ((handler instanceof HandlerMethod)) {
+			HandlerMethod method = (HandlerMethod) handler;
+			//判断访问的control是否添加ApiLogin注解
+			ApiLogin apiLogin = method.getMethodAnnotation(ApiLogin.class);
+			String appIdHeader = request.getHeader("app-id");
+			//小程序端的所有接口需要登录才能访问,校验thirdSession
+			return this.judeSession(request, response, apiLogin);
+		}
+		return Boolean.TRUE;
 	}
 
 	/**

+ 45 - 2
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/HotelController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.bus.controller;
 import annotation.ApiLogin;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -8,6 +9,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
@@ -24,6 +26,9 @@ import org.jeecg.config.ApiVersionConstant;
 import org.jeecg.modules.business.entity.BusHotel;
 import org.jeecg.modules.business.service.IBusHotelService;
 import org.jeecg.modules.business.util.MapUtil;
+import org.jeecg.modules.rooms.entity.CesRoomLayout;
+import org.jeecg.modules.rooms.service.CesRoomLayoutPriceServiceImpl;
+import org.jeecg.modules.rooms.service.CesRoomLayoutServiceImpl;
 import org.jeecg.modules.system.entity.SysTenant;
 import org.jeecg.modules.system.service.ISysTenantService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,15 +54,17 @@ import java.util.Map;
 public class HotelController extends  WebConfig {
    @Resource
    private IBusHotelService busHotelService;
+   @Resource
+   private CesRoomLayoutServiceImpl cesRoomLayoutService;
 
     /**
-     * 列表查询
+     * 酒店列表查询
      *
      * @param busHotel
      * @param req
      * @return
      */
-    @ApiOperation(value="bus_hotel-列表查询", notes="bus_hotel-列表查询")
+    @ApiOperation(value="酒店列表查询", notes="酒店列表查询")
     @GetMapping(value = "/queryList")
     @ApiLogin
     @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
@@ -73,4 +80,40 @@ public class HotelController extends  WebConfig {
         List<BusHotel> list = busHotelService.list(queryWrapper);
         return Result.OK(list);
     }
+
+    @ApiOperation(value="可入住酒店列表", notes="可入住酒店列表")
+    @GetMapping(value = "/can-use-hotel-list")
+    @ApiLogin
+    @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+    public Result<List<BusHotel>> getCanUseHotelList(BusHotel busHotel, HttpServletRequest req) {
+        LambdaQueryWrapper<BusHotel> queryWrapper = QueryGenerator.initQueryWrapper(busHotel, req.getParameterMap()).lambda();
+        if (StringUtils.isNotBlank(busHotel.getKeyWord())) {
+            queryWrapper.and(t -> {
+                t.like(BusHotel::getAddress, busHotel.getKeyWord());
+                t.or().like(BusHotel::getName, busHotel.getKeyWord());
+                t.or().like(BusHotel::getIntroduction, busHotel.getKeyWord());
+            });
+        }
+        String tenantId = TenantContextHolder.getTenantId();
+        if (StringUtils.isNotBlank(tenantId)) {
+            queryWrapper.eq(BusHotel::getTenantId, tenantId);
+        }
+        queryWrapper.eq(BusHotel::getStatus, 1);
+        queryWrapper.eq(BusHotel::getCheckStatus, 1);
+        queryWrapper.eq(BusHotel::getDelFlag, 0);
+        List<BusHotel> list = busHotelService.list(queryWrapper);
+        list.forEach(t -> {
+            LambdaQueryWrapper<CesRoomLayout> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+            lambdaQueryWrapper.eq(CesRoomLayout::getHotelId, t.getId());
+            lambdaQueryWrapper.orderByAsc(CesRoomLayout::getMarketPrice).last("limit 1");
+            CesRoomLayout cesRoomLayout = cesRoomLayoutService.getOne(lambdaQueryWrapper);
+            if (cesRoomLayout != null) {
+                t.setMinPrice(cesRoomLayout.getMarketPrice());
+            }
+            if (ObjectUtils.isNotEmpty(busHotel.getLat()) && ObjectUtils.isNotEmpty(busHotel.getLng())) {
+
+            }
+        });
+        return Result.OK(list);
+    }
 }

+ 22 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusHotel.java

@@ -3,10 +3,8 @@ package org.jeecg.modules.business.entity;
 import java.io.Serializable;
 import java.util.Date;
 import java.math.BigDecimal;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableLogic;
+
+import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -264,4 +262,24 @@ public class BusHotel implements Serializable {
     @Excel(name = "酒店标签", width = 15)
     @ApiModelProperty(value = "酒店标签")
     private String tagList;
+
+    @ApiModelProperty(value = "搜索关键词")
+    @TableField(exist = false)
+    private String keyWord;
+
+    @ApiModelProperty(value = "最低价格")
+    @TableField(exist = false)
+    private BigDecimal minPrice;
+
+    @ApiModelProperty(value = "评分")
+    @TableField(exist = false)
+    private Integer score;
+
+    @ApiModelProperty(value = "评论数")
+    @TableField(exist = false)
+    private BigDecimal commentNum;
+
+    @ApiModelProperty(value = "距离")
+    @TableField(exist = false)
+    private BigDecimal distance;
 }

+ 43 - 41
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/mapper/SummaryMapper.java

@@ -41,9 +41,9 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "inner join bus_room_pay_type_info pty on h.id=pty.hotel_id\n" +
             "left join pos_order_goods_payment ogp on pty.id=ogp.payment_method\n" +
             "where 1=1" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = #{hotelId} </if>" +
-            "<if test='startTime != null'> and ogp.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and ogp.create_time &lt;= #{endTime} </if>" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = '${hotelId}' </if>" +
+            "<if test='startTime != null'> and ogp.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and ogp.create_time &lt;= '${endTime}' </if>" +
             "group by h.id\n" +
             "UNION ALL\n" +
             "select max(h.name) as hotel_name,'客房' as department\n" +
@@ -54,9 +54,9 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "inner join bus_room_pay_type_info pty on h.id=pty.hotel_id\n" +
             "left join bus_order_fee of on pty.id=of.pay_type\n" +
             "where of.fee_type=2 and of.preferential_status=2" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = #{hotelId} </if>" +
-            "<if test='startTime != null'> and of.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and of.create_time &lt;= #{endTime} </if>" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = '${hotelId}' </if>" +
+            "<if test='startTime != null'> and of.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and of.create_time &lt;= '${endTime}' </if>" +
             "group by h.id</script>")
     public List<HashMap<String, Object>> pageList(Page<HashMap<String, Object>> page, @Param("busRoomPayTypes") List<BusRoomPayType> busRoomPayTypes, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
@@ -79,9 +79,9 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "inner join bus_room_pay_type_info pty on h.id=pty.hotel_id\n" +
             "left join pos_order_goods_payment ogp on pty.id=ogp.payment_method\n" +
             "where 1=1" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = #{hotelId} </if>" +
-            "<if test='startTime != null'> and ogp.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and ogp.create_time &lt;= #{endTime} </if>" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = '${hotelId}' </if>" +
+            "<if test='startTime != null'> and ogp.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and ogp.create_time &lt;= '${endTime}' </if>" +
             "group by h.id</script>")
     public List<HashMap<String, Object>> posPageList(Page<HashMap<String, Object>> page, @Param("busRoomPayTypes") List<BusRoomPayType> busRoomPayTypes, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
@@ -103,9 +103,9 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "inner join bus_room_pay_type_info pty on h.id=pty.hotel_id\n" +
             "left join bus_order_fee of on pty.id=of.pay_type\n" +
             "where of.fee_type=2 and of.preferential_status=2" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = #{hotelId} </if>" +
-            "<if test='startTime != null'> and of.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and of.create_time &lt;= #{endTime} </if>" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and h.id = '${hotelId}' </if>" +
+            "<if test='startTime != null'> and of.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and of.create_time &lt;= '${endTime}' </if>" +
             "group by h.id</script>")
     public List<HashMap<String, Object>> roomPageList(Page<HashMap<String, Object>> page, @Param("busRoomPayTypes") List<BusRoomPayType> busRoomPayTypes, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
@@ -125,8 +125,8 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "left join bus_room_pay_type_info pty on pty.id=ogp.payment_method\n" +
             "where 1=1" +
             "<if test='hotelId != null and hotelId !=\"\"'> and ogp.hotel_id = #{hotelId} </if>" +
-            "<if test='startTime != null'> and ogp.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and ogp.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and ogp.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and ogp.create_time &lt;= '${endTime}' </if>" +
             "UNION ALL\n" +
             "select '住客' as department,pty.name as payment_method_name,\n" +
             "case when of.money>=0 then '收款' else '退款' end as fee_type,\n" +
@@ -138,8 +138,8 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "left join bus_customer c on c.id=rlo.contact_id\n" +
             "where of.fee_type=2 and of.preferential_status=2" +
             "<if test='hotelId != null and hotelId !=\"\"'> and pty.hotel_id = #{hotelId} </if>" +
-            "<if test='startTime != null'> and of.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and of.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and of.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and of.create_time &lt;= '${endTime}' </if>" +
             "</script>")
     public List<HashMap<String, Object>> financePage(Page<HashMap<String, Object>> page, @Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
@@ -480,13 +480,15 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "</foreach>" +
             "            from bus_room_pay_type_info pty\n" +
             "            left join pos_order_goods_payment ogp on pty.id=ogp.payment_method\n" +
-            "<if test='startTime != null'> and ogp.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and ogp.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and ogp.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and ogp.create_time &lt;= '${endTime}' </if>" +
             "            where 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and pty.hotel_id = '${hotelId}' </if>" +
             "            UNION ALL\n" +
-            "            select max(t.name) as name,SUM(case of.pay_type when '1633765326418755585' then of.money else 0 end) as '微信'\n" +
-            "            ,SUM(case of.pay_type when '1645358935063744514' then of.money else 0 end) as '现金'\n" +
+            "            select max(t.name) as name" +
+            "<foreach item='item' index='index' collection='busRoomPayTypes' open=',' separator=',' close=' '>" +
+            "SUM(case of.pay_type when '${item.id}' then  of.money else 0 end) as '${item.name}'\n"+
+            "</foreach>" +
             "\t\t\t\t\t\tfrom(select id,name from (select 1 as id,'押金' as name \n" +
             "\t\t\t\t\t\tunion select 2 as id,'预收房费' as name \n" +
             "\t\t\t\t\t\tunion select 3 as id,'每日房费' as name\n" +
@@ -496,8 +498,8 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "            left join bus_order_fee of on of.subject_type=t.id\n" +
             "            and of.fee_type=2 and of.preferential_status=2\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and of.hotel_id = '${hotelId}' </if>" +
-            "<if test='startTime != null'> and of.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and of.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and of.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and of.create_time &lt;= '${endTime}' </if>" +
             "            group by t.id</script>")
     public List<HashMap<String, Object>> subjectTypeStatList(@Param("hotelId") String hotelId, @Param("busRoomPayTypes") List<BusRoomPayType> busRoomPayTypes, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
@@ -513,24 +515,24 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "            ,sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money else 0 end),0)) AS room_money\n" +
             "            ,sum(ifnull((case t.subject_type when 6 then t.money when 7 then t.money else 0 end),0)) AS other_money\n" +
             "            ,sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money when 6 then t.money when 7 then t.money else 0 end),0)) AS sum_money\n" +
-            "            ,round( sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money else 0 end),0))/ifnull(max(t2.rz_count),0),2) AS room_average_price\n" +
+            "            ,ifnull(round(sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money else 0 end),0))/ifnull(max(t2.rz_count),0),2),0) AS room_average_price\n" +
             "\t\t\t\t\t\tfrom bus_dict_item_info a\n" +
             "            LEFT JOIN (select room.customer_source,b.money,b.subject_type,b.room_id from bus_rooms_living_order room\n" +
             "            LEFT JOIN  bus_order_fee b ON room.id=b.living_order_id and b.fee_type=2 and b.preferential_status=2 where 1=1 \n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and room.hotel_id = '${hotelId}' </if>" +
-            "<if test='startTime != null'> and room.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and room.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and room.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and room.create_time &lt;= '${endTime}' </if>" +
             "            ) t\n" +
             "            ON t.customer_source=a.id\n" +
             "            LEFT JOIN (\n" +
             "            select customer_source,count(0) as rz_count from bus_rooms_living_order where 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and hotel_id = '${hotelId}' </if>" +
-            "<if test='startTime != null'> and create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and create_time &lt;= '${endTime}' </if>" +
             "            group by customer_source) t2\n" +
             "            ON t2.customer_source=a.id\n" +
             "            where 1=1 and a.dict_id='1639538915239743490'\n" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and of.hotel_id = '${hotelId}' </if>" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and a.hotel_id = '${hotelId}' </if>" +
             "            GROUP BY a.id</script>")
     public List<HashMap<String, Object>> livingSourceStatList(@Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
@@ -555,16 +557,16 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "\t\t\t\t\t\t) a\n" +
             "            LEFT JOIN (select room.customer_type,b.money,b.subject_type,b.room_id from bus_rooms_living_order room\n" +
             "            INNER JOIN  bus_order_fee b ON room.id=b.living_order_id and b.fee_type=2 and b.preferential_status=2 \n" +
-            "\t\t\t\t\t\twhere 1=1'\n" +
+            "\t\t\t\t\t\twhere 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and room.hotel_id = '${hotelId}' </if>" +
-            "<if test='startTime != null'> and room.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and room.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and room.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and room.create_time &lt;= '${endTime}' </if>" +
             "            ) t\n" +
             "            ON t.customer_type=a.id\n" +
             "            LEFT JOIN (\n" +
             "            select customer_type,count(0) as rz_count from bus_rooms_living_order\n" +
-            "\t\t\t\t\t\twhere 1=1'\n" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and of.hotel_id = '${hotelId}' </if>" +
+            "\t\t\t\t\t\twhere 1=1\n" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and hotel_id = '${hotelId}' </if>" +
             "            group by customer_type) t2\n" +
             "            ON t2.customer_type=a.id\n" +
             "            GROUP BY a.id</script>")
@@ -582,23 +584,23 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "            ,sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money else 0 end),0)) AS room_money\n" +
             "            ,sum(ifnull((case t.subject_type when 6 then t.money when 7 then t.money else 0 end),0)) AS other_money\n" +
             "            ,sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money when 6 then t.money when 7 then t.money else 0 end),0)) AS sum_money\n" +
-            "            ,round(sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money else 0 end),0))/ifnull(max(t2.rz_count),0),2) AS room_average_price\n" +
+            "            ,ifnull(round(sum(ifnull((case t.subject_type when 1 then t.money when 2 then t.money when 3 then t.money when 5 then t.money else 0 end),0))/ifnull(max(t2.rz_count),0),2),0) AS room_average_price\n" +
             "\t\t\t\t\t\tfrom (\n" +
             "\t\t\t\t\t\tselect 1 as id,'全天' as name\n" +
             "\t\t\t\t\t\tunion select 2 as id,'钟点房' as name"+
             "\t\t\t\t\t\t) a\n" +
-            "            LEFT JOIN (select room.customer_type,b.money,b.subject_type,b.room_id from bus_rooms_living_order room\n" +
+            "            LEFT JOIN (select room.customer_type,room.living_type,b.money,b.subject_type,b.room_id from bus_rooms_living_order room\n" +
             "            INNER JOIN  bus_order_fee b ON room.id=b.living_order_id and b.fee_type=2 and b.preferential_status=2 \n" +
-            "\t\t\t\t\t\twhere 1=1'\n" +
+            "\t\t\t\t\t\twhere 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and room.hotel_id = '${hotelId}' </if>" +
-            "<if test='startTime != null'> and room.create_time &gt;= #{startTime} </if>" +
-            "<if test='endTime != null'> and room.create_time &lt;= #{endTime} </if>" +
+            "<if test='startTime != null'> and room.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and room.create_time &lt;= '${endTime}' </if>" +
             "            ) t\n" +
             "            ON t.living_type=a.id\n" +
             "            LEFT JOIN (\n" +
             "            select living_type,count(0) as rz_count from bus_rooms_living_order\n" +
-            "\t\t\t\t\t\twhere 1=1'\n" +
-            "<if test='hotelId != null and hotelId !=\"\"'> and of.hotel_id = '${hotelId}' </if>" +
+            "\t\t\t\t\t\twhere 1=1\n" +
+            "<if test='hotelId != null and hotelId !=\"\"'> and hotel_id = '${hotelId}' </if>" +
             "            group by living_type) t2\n" +
             "            ON t2.living_type=a.id\n" +
             "            GROUP BY a.id</script>")
@@ -633,7 +635,7 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "where 1=1\n" +
             "and b.fee_type=2 and b.preferential_status=2 and subject_type!=4\n" +
             "and datediff(b.create_time,now())=0\n" +
-            "<if test='roomId != null and roomId !=\"\"'> and b.roomId = '${roomId}' </if>" +
+            "<if test='roomId != null and roomId !=\"\"'> and b.room_id = '${roomId}' </if>" +
             "</script>")
     public List<HashMap<String, Object>> roomStatDeatilList(@Param("roomId") String roomId);