浏览代码

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-backend

覃浩 2 年之前
父节点
当前提交
b6113708c7
共有 34 个文件被更改,包括 774 次插入151 次删除
  1. 1 1
      jeecg-mall-api/src/main/java/annotation/ApiLogin.java
  2. 1 1
      jeecg-mall-api/src/main/java/com/util/ThirdSessionHolder.java
  3. 9 9
      jeecg-mall-api/src/main/java/config/WebConfig.java
  4. 4 3
      jeecg-mall-api/src/main/java/interceptor/ThirdSessionInterceptor.java
  5. 3 9
      jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/CouponsCashUsedController.java
  6. 3 3
      jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/CouponsUsedController.java
  7. 126 37
      jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/HotelController.java
  8. 3 5
      jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/MemberCardController.java
  9. 1 3
      jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/ParamXcxRoomController.java
  10. 125 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/controller/MallCollectHotelController.java
  11. 158 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/controller/MallContactController.java
  12. 56 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/entity/MallCollectHotel.java
  13. 55 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/entity/MallContact.java
  14. 17 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/MallCollectHotelMapper.java
  15. 17 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/MallContactMapper.java
  16. 5 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/xml/MallCollectHotelMapper.xml
  17. 5 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/xml/MallContactMapper.xml
  18. 14 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/IMallCollectHotelService.java
  19. 14 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/IMallContactService.java
  20. 19 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/impl/MallCollectHotelServiceImpl.java
  21. 19 0
      jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/impl/MallContactServiceImpl.java
  22. 6 29
      jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/controller/WxUserController.java
  23. 4 4
      jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/entity/UserInfo.java
  24. 2 5
      jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/mapper/UserInfoMapper.java
  25. 4 5
      jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/service/IUserInfoService.java
  26. 12 16
      jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/service/impl/UserInfoServiceImpl.java
  27. 1 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/dto/BookingOrderSaveDto.java
  28. 31 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/mapper/BusHotelMapper.java
  29. 11 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/IBusHotelService.java
  30. 17 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusHotelServiceImpl.java
  31. 6 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/controller/SummaryController.java
  32. 18 9
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/mapper/SummaryMapper.java
  33. 2 2
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/service/ISummaryService.java
  34. 5 5
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/service/impl/SummaryServiceImpl.java

+ 1 - 1
jeecg-mall-api/src/main/java/annotation/ApiLogin.java

@@ -1,4 +1,4 @@
-package annotation;
+package org.jeecg.annotation;
 
 import lombok.extern.slf4j.Slf4j;
 

+ 1 - 1
jeecg-mall-api/src/main/java/com/util/ThirdSessionHolder.java

@@ -1,4 +1,4 @@
-package com.util;
+package org.jeecg.com.util;
 
 import com.alibaba.ttl.TransmittableThreadLocal;
 import lombok.experimental.UtilityClass;

+ 9 - 9
jeecg-mall-api/src/main/java/config/WebConfig.java

@@ -1,10 +1,10 @@
-package config;
+package org.jeecg.config;
 
-import interceptor.ThirdSessionInterceptor;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.RedisUtil;
 import org.jeecg.config.sign.interceptor.SignAuthInterceptor;
+import org.jeecg.interceptor.ThirdSessionInterceptor;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -26,13 +26,13 @@ public class WebConfig implements WebMvcConfigurer {
 //	@Resource
 //	private RedisUtil redisUtil;
 
-	@Bean
-	public ThirdSessionInterceptor thirdSessionInterceptor() {
-		return new ThirdSessionInterceptor();
-	}
+//	@Bean
+//	public ThirdSessionInterceptor thirdSessionInterceptor() {
+//		return new ThirdSessionInterceptor();
+//	}
 
-//	@Resource
-//	private ThirdSessionInterceptor thirdSessionInterceptor;
+	@Resource
+	private ThirdSessionInterceptor thirdSessionInterceptor;
 	/**
 	 * 拦截器
 	 * @param registry
@@ -44,7 +44,7 @@ public class WebConfig implements WebMvcConfigurer {
 		 * 进入ThirdSession拦截器
 		 */
 		registry
-				.addInterceptor(thirdSessionInterceptor())
+				.addInterceptor(thirdSessionInterceptor)
 				.addPathPatterns("/mall-api/**")  //拦截路径
                 .excludePathPatterns("/mall-api/wxuser/ma-login");     //不拦截路径
 		WebMvcConfigurer.super.addInterceptors(registry);

+ 4 - 3
jeecg-mall-api/src/main/java/interceptor/ThirdSessionInterceptor.java

@@ -1,13 +1,14 @@
-package interceptor;
+package org.jeecg.interceptor;
+
 
-import annotation.ApiLogin;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.druid.support.json.JSONUtils;
-import com.util.ThirdSessionHolder;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.authc.AuthenticationException;
+import org.jeecg.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.exception.JeecgBoot401Exception;
 import org.jeecg.common.exception.JeecgBootException;

+ 3 - 9
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/CouponsCashUsedController.java

@@ -9,25 +9,19 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.constraints.DecimalMin;
-
-import annotation.ApiLogin;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.util.ThirdSessionHolder;
-import config.WebConfig;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.poi.hpsf.Decimal;
+import org.jeecg.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.TenantContextHolder;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
 import org.jeecg.modules.business.dto.CouponsGenerateDto;
 import org.jeecg.modules.business.dto.PostDataDto;
 import org.jeecg.modules.business.dto.ProvideCouponsUsedDto;

+ 3 - 3
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/CouponsUsedController.java

@@ -1,18 +1,17 @@
 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.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.util.ThirdSessionHolder;
-import config.WebConfig;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.jeecg.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
@@ -20,6 +19,7 @@ import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.TenantContextHolder;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
 import org.jeecg.modules.business.dto.CouponsGenerateDto;
 import org.jeecg.modules.business.dto.PostDataDto;
 import org.jeecg.modules.business.dto.ProvideCouponsUsedDto;

+ 126 - 37
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/HotelController.java

@@ -1,16 +1,16 @@
 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;
-import config.WebConfig;
 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.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.constant.CommonConstant;
@@ -23,12 +23,23 @@ import org.jeecg.common.util.TenantContextHolder;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
+import org.jeecg.modules.business.dto.BookingOrderSaveDto;
 import org.jeecg.modules.business.entity.BusHotel;
+import org.jeecg.modules.business.entity.BusMarketCouponsCashUsed;
+import org.jeecg.modules.business.entity.BusMemberCard;
 import org.jeecg.modules.business.service.IBusHotelService;
+import org.jeecg.modules.business.service.IBusMemberCardService;
+import org.jeecg.modules.business.service.IBusRoomBookingOrdersService;
 import org.jeecg.modules.business.util.MapUtil;
+import org.jeecg.modules.order.entity.CesOrderComment;
+import org.jeecg.modules.order.service.impl.CesOrderCommentServiceImpl;
+import org.jeecg.modules.rooms.DTO.CanUseRequestParamDto;
+import org.jeecg.modules.rooms.Vo.CanUseResultVo;
 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.rooms.service.CesRoomsServiceImpl;
 import org.jeecg.modules.system.entity.SysTenant;
 import org.jeecg.modules.system.service.ISysTenantService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -51,11 +62,19 @@ import java.util.Map;
 @AllArgsConstructor
 @RequestMapping("/mall-api/hotel")
 @Slf4j
-public class HotelController extends  WebConfig {
-   @Resource
-   private IBusHotelService busHotelService;
-   @Resource
-   private CesRoomLayoutServiceImpl cesRoomLayoutService;
+public class HotelController extends WebConfig {
+    @Resource
+    private IBusHotelService busHotelService;
+    @Resource
+    private CesRoomLayoutServiceImpl cesRoomLayoutService;
+    @Resource
+    private CesRoomsServiceImpl cesRoomsService;
+    @Resource
+    private CesOrderCommentServiceImpl cesOrderCommentService;
+    @Resource
+    private IBusRoomBookingOrdersService busRoomBookingOrdersService;
+    @Resource
+    private IBusMemberCardService busMemberCardService;
 
     /**
      * 酒店列表查询
@@ -64,7 +83,7 @@ public class HotelController extends  WebConfig {
      * @param req
      * @return
      */
-    @ApiOperation(value="酒店列表查询", notes="酒店列表查询")
+    @ApiOperation(value = "酒店列表查询", notes = "酒店列表查询")
     @GetMapping(value = "/queryList")
     @ApiLogin
     @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
@@ -81,39 +100,109 @@ public class HotelController extends  WebConfig {
         return Result.OK(list);
     }
 
-    @ApiOperation(value="可入住酒店列表", notes="可入住酒店列表")
+    /**
+     * 可入住酒店列表
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param sort     0推荐排序 1 距离优先 2低价优先 3评分优先 4评论数优先
+     * @param keyWord  搜索关键字
+     * @param req
+     * @return
+     */
+    @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());
-            });
-        }
+    public Result<IPage<BusHotel>> getCanUseHotelList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                      @RequestParam(name = "sort", defaultValue = "0") Integer sort,
+                                                      @RequestParam(name = "keyWord", defaultValue = "") String keyWord,
+                                                      HttpServletRequest req) {
+        Page<BusHotel> page = new Page<BusHotel>(pageNo, pageSize);
         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())) {
+        IPage<BusHotel> pageList = busHotelService.pageList(page, tenantId, keyWord, sort);
+        return Result.OK(pageList);
+    }
 
-            }
-        });
-        return Result.OK(list);
+    /**
+     * 通过id查询酒店详情
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "通过id查询酒店详情", notes = "通过id查询酒店详情")
+    @GetMapping(value = "/queryById")
+    @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+    public Result<BusHotel> queryById(@RequestParam(name = "id", required = true) String id) {
+        BusHotel busHotel = busHotelService.getById(id);
+        return Result.OK(busHotel);
+    }
+
+    /**
+     * 根据酒店查询房型对应可用房间
+     *
+     * @param param
+     * @return
+     */
+    @ApiOperation(value = "根据酒店查询房型对应可用房间", notes = "根据酒店查询房型对应可用房间")
+    @GetMapping(value = "/can-user-rooms")
+    @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+    public Result<List<CanUseResultVo>> getCanUseRooms(CanUseRequestParamDto param) {
+        if (param.getHotelId() == null || param.getHotelId().isEmpty())
+            throw new JeecgBootException("参数错误");
+        if (param.getEndOf() == null || param.getStartOf() == null)
+            throw new JeecgBootException("请传入时间范围");
+        return Result.ok(cesRoomsService.getCanUseRooms(param));
+    }
+
+
+    /**
+     * 根据酒店查询评价列表
+     * @param cesOrderComment
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value="根据酒店查询评价列表", notes="根据酒店查询评价列表")
+    @GetMapping(value = "/comment-list")
+    @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+    public Result<IPage<CesOrderComment>> getCommentPageList(CesOrderComment cesOrderComment,
+                                                        @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                        @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        LambdaQueryWrapper<CesOrderComment> queryWrapper = QueryGenerator.initQueryWrapper(cesOrderComment, req.getParameterMap()).lambda();
+        Page<CesOrderComment> page = new Page<CesOrderComment>(pageNo, pageSize);
+        IPage<CesOrderComment> pageList = cesOrderCommentService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+
+    /**
+     * 酒店预定订单添加
+     * @param busRoomBookingOrders
+     * @return
+     */
+    @AutoLog(value = "酒店预定订单-添加")
+    @ApiOperation(value="酒店预定订单-添加", notes="酒店预定订单-添加")
+    @PostMapping(value = "/hotel-room-booking")
+    @ApiLogin
+    @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+    public Result<String> hotelRoomBookingAdd(@RequestBody BookingOrderSaveDto busRoomBookingOrders) {
+        Boolean isTeam = busRoomBookingOrders.getOrderInfo().getBookingOrdersType().equals(2);
+        busRoomBookingOrders.getOrderInfo().setBookingOrdersType(1);
+        String tenantId = TenantContextHolder.getTenantId();
+        String userId = ThirdSessionHolder.getUserId();
+        LambdaQueryWrapper<BusMemberCard> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(BusMemberCard::getUserId, userId);
+        lambdaQueryWrapper.eq(BusMemberCard::getHotelId, busRoomBookingOrders.getHotelId());
+        Long count = busMemberCardService.count(lambdaQueryWrapper);
+        if (count > 0) {
+            busRoomBookingOrders.getOrderInfo().setCustomerType(2);
+        } else {
+            busRoomBookingOrders.getOrderInfo().setCustomerType(1);
+        }
+        return Result.OK("预定成功", busRoomBookingOrdersService.bookingOrderSave(busRoomBookingOrders, isTeam));
     }
 }

+ 3 - 5
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/MemberCardController.java

@@ -1,17 +1,14 @@
 package org.jeecg.modules.bus.controller;
-
-import annotation.ApiLogin;
-import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.util.ThirdSessionHolder;
-import config.WebConfig;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.jeecg.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.exception.JeecgBootException;
@@ -22,6 +19,7 @@ import org.jeecg.common.util.TenantContextHolder;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
 import org.jeecg.modules.business.dto.UserGroupDto;
 import org.jeecg.modules.business.dto.UserLabelDto;
 import org.jeecg.modules.business.entity.*;

+ 1 - 3
jeecg-mall-api/src/main/java/org/jeecg/modules/bus/controller/ParamXcxRoomController.java

@@ -1,9 +1,6 @@
 package org.jeecg.modules.bus.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import config.WebConfig;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -18,6 +15,7 @@ import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
 import org.jeecg.modules.business.entity.BusParamXcxRoom;
 import org.jeecg.modules.business.service.IBusParamXcxRoomService;
 import org.springframework.beans.factory.annotation.Autowired;

+ 125 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/controller/MallCollectHotelController.java

@@ -0,0 +1,125 @@
+package org.jeecg.modules.mall.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import org.jeecg.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.TenantContextHolder;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.config.ApiVersion;
+import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
+import org.jeecg.modules.mall.entity.MallCollectHotel;
+import org.jeecg.modules.mall.entity.MallContact;
+import org.jeecg.modules.mall.service.IMallCollectHotelService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: mall_collect_hotel
+ * @Author: jeecg-boot
+ * @Date:   2023-04-27
+ * @Version: V1.0
+ */
+@Api(tags="酒店收藏")
+@RestController
+@RequestMapping("/mall-api/collect-hotel")
+@Slf4j
+public class MallCollectHotelController extends WebConfig {
+	@Resource
+	private IMallCollectHotelService mallCollectHotelService;
+
+	/**
+	 * 分页列表查询
+	 *
+	 * @param mallCollectHotel
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@ApiOperation(value="mall_collect_hotel-分页列表查询", notes="mall_collect_hotel-分页列表查询")
+	@GetMapping(value = "/list")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	public Result<IPage<MallCollectHotel>> queryPageList(MallCollectHotel mallCollectHotel,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		LambdaQueryWrapper<MallCollectHotel> queryWrapper = QueryGenerator.initQueryWrapper(mallCollectHotel, req.getParameterMap()).lambda();
+		String userId = ThirdSessionHolder.getUserId();
+		queryWrapper.eq(MallCollectHotel::getUserId,userId);
+		Page<MallCollectHotel> page = new Page<MallCollectHotel>(pageNo, pageSize);
+		IPage<MallCollectHotel> pageList = mallCollectHotelService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+
+	/**
+	 *   添加
+	 *
+	 * @param mallCollectHotel
+	 * @return
+	 */
+	@AutoLog(value = "mall_collect_hotel-添加")
+	@ApiOperation(value="mall_collect_hotel-添加", notes="mall_collect_hotel-添加")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody MallCollectHotel mallCollectHotel) {
+		String tenantId = TenantContextHolder.getTenantId();
+		String userId = ThirdSessionHolder.getUserId();
+		mallCollectHotel.setUserId(userId);
+		mallCollectHotel.setTenantId(tenantId);
+		mallCollectHotelService.save(mallCollectHotel);
+		return Result.OK("添加成功!");
+	}
+
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "mall_collect_hotel-通过id删除")
+	@ApiOperation(value="mall_collect_hotel-通过id删除", notes="mall_collect_hotel-通过id删除")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		mallCollectHotelService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+
+}

+ 158 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/controller/MallContactController.java

@@ -0,0 +1,158 @@
+package org.jeecg.modules.mall.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+
+import org.jeecg.annotation.ApiLogin;
+import org.jeecg.com.util.ThirdSessionHolder;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.TenantContextHolder;
+import org.jeecg.common.util.oConvertUtils;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.config.ApiVersion;
+import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
+import org.jeecg.modules.mall.entity.MallContact;
+import org.jeecg.modules.mall.service.IMallContactService;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+@Api(tags="商城联系人")
+@RestController
+@RequestMapping("/mall-api/contact")
+@Slf4j
+public class MallContactController extends WebConfig {
+	@Resource
+	private IMallContactService mallContactService;
+
+	/**
+	 * 商城联系人分页列表查询
+	 *
+	 * @param mallContact
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@ApiOperation(value="商城联系人分页列表查询", notes="商城联系人分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<MallContact>> queryPageList(MallContact mallContact,
+													@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+													@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+													HttpServletRequest req) {
+		LambdaQueryWrapper<MallContact> queryWrapper = QueryGenerator.initQueryWrapper(mallContact, req.getParameterMap()).lambda();
+		String userId = ThirdSessionHolder.getUserId();
+		queryWrapper.eq(MallContact::getUserId,userId);
+		Page<MallContact> page = new Page<MallContact>(pageNo, pageSize);
+		IPage<MallContact> pageList = mallContactService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+
+	/**
+	 *   添加商城联系人
+	 *
+	 * @param mallContact
+	 * @return
+	 */
+	@AutoLog(value = "添加商城联系人")
+	@ApiOperation(value="添加商城联系人", notes="添加商城联系人")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody MallContact mallContact) {
+		String tenantId = TenantContextHolder.getTenantId();
+		String userId = ThirdSessionHolder.getUserId();
+		mallContact.setUserId(userId);
+		mallContact.setTenantId(tenantId);
+		mallContactService.save(mallContact);
+		return Result.OK("添加成功!");
+	}
+
+	/**
+	 *  编辑商城联系人
+	 *
+	 * @param mallContact
+	 * @return
+	 */
+	@AutoLog(value = "编辑商城联系人")
+	@ApiOperation(value="编辑商城联系人", notes="编辑商城联系人")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody MallContact mallContact) {
+		mallContactService.updateById(mallContact);
+		return Result.OK("编辑成功!");
+	}
+
+	/**
+	 *   通过id删除商城联系人
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "通过id删除商城联系人")
+	@ApiOperation(value="通过id删除商城联系人", notes="通过id删除商城联系人")
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		mallContactService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+
+	/**
+	 * 通过id查询商城联系人
+	 *
+	 * @param id
+	 * @return
+	 */
+	@ApiLogin
+	@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
+	@ApiOperation(value="通过id查询商城联系人", notes="通过id查询商城联系人")
+	@GetMapping(value = "/queryById")
+	public Result<MallContact> queryById(@RequestParam(name="id",required=true) String id) {
+		MallContact mallContact = mallContactService.getById(id);
+		if(mallContact==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(mallContact);
+	}
+}

+ 56 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/entity/MallCollectHotel.java

@@ -0,0 +1,56 @@
+package org.jeecg.modules.mall.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+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 lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: mall_collect_hotel
+ * @Author: jeecg-boot
+ * @Date:   2023-04-27
+ * @Version: V1.0
+ */
+@Data
+@TableName("mall_collect_hotel")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mall_collect_hotel对象", description="mall_collect_hotel")
+public class MallCollectHotel implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**key*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "key")
+    private String id;
+	/**关联租户*/
+	@Excel(name = "关联租户", width = 15)
+    @ApiModelProperty(value = "关联租户")
+    private String tenantId;
+	/**商城用户id*/
+	@Excel(name = "商城用户id", width = 15)
+    @ApiModelProperty(value = "商城用户id")
+    private String userId;
+	/**酒店id*/
+	@Excel(name = "酒店id", width = 15)
+    @ApiModelProperty(value = "酒店id")
+    private String hotelId;
+	/**创建日期*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+}

+ 55 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/entity/MallContact.java

@@ -0,0 +1,55 @@
+package org.jeecg.modules.mall.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+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 lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+@Data
+@TableName("mall_contact")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mall_contact对象", description="mall_contact")
+public class MallContact implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**key*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "key")
+    private String id;
+	/**关联租户*/
+	@Excel(name = "关联租户", width = 15)
+    @ApiModelProperty(value = "关联租户")
+    private String tenantId;
+	/**商城用户id*/
+	@Excel(name = "商城用户id", width = 15)
+    @ApiModelProperty(value = "商城用户id")
+    private String userId;
+	/**联系人名称*/
+	@Excel(name = "联系人名称", width = 15)
+    @ApiModelProperty(value = "联系人名称")
+    private String contactName;
+	/**同住人手机号*/
+	@Excel(name = "同住人手机号", width = 15)
+    @ApiModelProperty(value = "同住人手机号")
+    private String phone;
+}

+ 17 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/MallCollectHotelMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.mall.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.mall.entity.MallCollectHotel;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: mall_collect_hotel
+ * @Author: jeecg-boot
+ * @Date:   2023-04-27
+ * @Version: V1.0
+ */
+public interface MallCollectHotelMapper extends BaseMapper<MallCollectHotel> {
+
+}

+ 17 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/MallContactMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.mall.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.mall.entity.MallContact;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+public interface MallContactMapper extends BaseMapper<MallContact> {
+
+}

+ 5 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/xml/MallCollectHotelMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.demo.mall.mapper.MallCollectHotelMapper">
+
+</mapper>

+ 5 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/mapper/xml/MallContactMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.demo.mall.mapper.MallContactMapper">
+
+</mapper>

+ 14 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/IMallCollectHotelService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.mall.service;
+
+import org.jeecg.modules.mall.entity.MallCollectHotel;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: mall_collect_hotel
+ * @Author: jeecg-boot
+ * @Date:   2023-04-27
+ * @Version: V1.0
+ */
+public interface IMallCollectHotelService extends IService<MallCollectHotel> {
+
+}

+ 14 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/IMallContactService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.mall.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.mall.entity.MallContact;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+public interface IMallContactService extends IService<MallContact> {
+
+}

+ 19 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/impl/MallCollectHotelServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.mall.service.impl;
+
+import org.jeecg.modules.mall.entity.MallCollectHotel;
+import org.jeecg.modules.mall.mapper.MallCollectHotelMapper;
+import org.jeecg.modules.mall.service.IMallCollectHotelService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: mall_collect_hotel
+ * @Author: jeecg-boot
+ * @Date:   2023-04-27
+ * @Version: V1.0
+ */
+@Service
+public class MallCollectHotelServiceImpl extends ServiceImpl<MallCollectHotelMapper, MallCollectHotel> implements IMallCollectHotelService {
+
+}

+ 19 - 0
jeecg-mall-api/src/main/java/org/jeecg/modules/mall/service/impl/MallContactServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.mall.service.impl;
+
+import org.jeecg.modules.mall.entity.MallContact;
+import org.jeecg.modules.mall.mapper.MallContactMapper;
+import org.jeecg.modules.mall.service.IMallContactService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: mall_contact
+ * @Author: jeecg-boot
+ * @Date:   2023-04-26
+ * @Version: V1.0
+ */
+@Service
+public class MallContactServiceImpl extends ServiceImpl<MallContactMapper, MallContact> implements IMallContactService {
+
+}

+ 6 - 29
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/controller/WxUserController.java

@@ -1,47 +1,24 @@
 package org.jeecg.modules.wxuser.controller;
 
-import annotation.ApiLogin;
-import cn.binarywang.wx.miniapp.api.WxMaUserService;
-import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.util.ThirdSessionHolder;
-import config.WebConfig;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.jeecg.annotation.ApiLogin;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.constant.CommonConstant;
-import org.jeecg.common.system.query.MatchTypeEnum;
-import org.jeecg.common.system.query.QueryCondition;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.constant.VxeSocketConst;
 import org.jeecg.config.ApiVersion;
 import org.jeecg.config.ApiVersionConstant;
+import org.jeecg.config.WebConfig;
 import org.jeecg.modules.wxuser.dto.LoginDto;
 import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
-import org.jeecg.modules.wxuser.entity.ThirdSession;
-import org.jeecg.modules.wxuser.entity.UserInfo;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 import org.jeecg.modules.wxuser.service.IUserInfoService;
-import org.springframework.context.annotation.Configuration;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URLDecoder;
-import java.util.*;
 
 
 @Api(tags="商城登录")
@@ -63,14 +40,14 @@ public class WxUserController extends WebConfig {
     @ApiOperation(value = "小程序用户登录")
     @PostMapping("/ma-login")
     @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
-    public Result<UserInfo> loginMa(HttpServletRequest request, @RequestBody LoginDto dto) {
+    public Result<MallUserInfo> loginMa(HttpServletRequest request, @RequestBody LoginDto dto) {
         try {
             String appId = request.getHeader("app-id");
             if (StringUtils.isBlank(appId)) {
                 return Result.error("缺少appid");
             }
             dto.setAppId(appId);
-            UserInfo userInfo = userInfoService.loginMa(dto);
+            MallUserInfo userInfo = userInfoService.loginMa(dto);
             return Result.ok(userInfo);
         } catch (Exception e) {
             e.printStackTrace();
@@ -90,7 +67,7 @@ public class WxUserController extends WebConfig {
     public Result loginByPhoneMa(HttpServletRequest request, @RequestBody WxOpenDataDto dto) {
         try {
             String token = request.getHeader("third-session");
-            UserInfo userInfo = userInfoService.loginByPhoneMa(dto, token);
+            MallUserInfo userInfo = userInfoService.loginByPhoneMa(dto, token);
             return Result.ok(userInfo);
         } catch (Exception e) {
             e.printStackTrace();

+ 4 - 4
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/entity/UserInfo.java

@@ -17,17 +17,17 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 /**
- * @Description: user_info
+ * @Description: mall_user_info
  * @Author: jeecg-boot
  * @Date:   2023-04-25
  * @Version: V1.0
  */
 @Data
-@TableName("user_info")
+@TableName("mall_user_info")
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = false)
-@ApiModel(value="user_info对象", description="user_info")
-public class UserInfo implements Serializable {
+@ApiModel(value="mall_user_info对象", description="mall_user_info")
+public class MallUserInfo implements Serializable {
     private static final long serialVersionUID = 1L;
 
 	/**id*/

+ 2 - 5
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/mapper/UserInfoMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.wxuser.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.jeecg.modules.wxuser.entity.UserInfo;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 
 /**
  * @Description: user_info
@@ -12,6 +9,6 @@ import org.jeecg.modules.wxuser.entity.UserInfo;
  * @Date:   2023-04-25
  * @Version: V1.0
  */
-public interface UserInfoMapper extends BaseMapper<UserInfo> {
+public interface UserInfoMapper extends BaseMapper<MallUserInfo> {
 
 }

+ 4 - 5
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/service/IUserInfoService.java

@@ -3,8 +3,7 @@ package org.jeecg.modules.wxuser.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.wxuser.dto.LoginDto;
 import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
-import org.jeecg.modules.wxuser.entity.UserInfo;
-import org.springframework.transaction.annotation.Transactional;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 
 /**
  * @Description: user_info
@@ -12,18 +11,18 @@ import org.springframework.transaction.annotation.Transactional;
  * @Date:   2023-04-25
  * @Version: V1.0
  */
-public interface IUserInfoService extends IService<UserInfo> {
+public interface IUserInfoService extends IService<MallUserInfo> {
     /**
      * wx.login登陆成功之后发送请求,后端登录
      * @param dto
      * @return
      */
-    public UserInfo loginMa(LoginDto dto);
+    public MallUserInfo loginMa(LoginDto dto);
 
     /**
      * 通过小程序授权手机号一键登录商城
      * @param dto
      * @return
      */
-    public UserInfo loginByPhoneMa(WxOpenDataDto dto, String token);
+    public MallUserInfo loginByPhoneMa(WxOpenDataDto dto, String token);
 }

+ 12 - 16
jeecg-mall-api/src/main/java/org/jeecg/modules/wxuser/service/impl/UserInfoServiceImpl.java

@@ -10,9 +10,8 @@ import com.alibaba.druid.support.json.JSONUtils;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.util.ThirdSessionHolder;
 import me.chanjar.weixin.common.error.WxErrorException;
-import org.jeecg.common.api.vo.Result;
+import org.jeecg.com.util.ThirdSessionHolder;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.util.JwtUtil;
@@ -21,7 +20,7 @@ import org.jeecg.common.util.TenantContextHolder;
 import org.jeecg.modules.wxuser.dto.LoginDto;
 import org.jeecg.modules.wxuser.dto.WxOpenDataDto;
 import org.jeecg.modules.wxuser.entity.ThirdSession;
-import org.jeecg.modules.wxuser.entity.UserInfo;
+import org.jeecg.modules.wxuser.entity.MallUserInfo;
 import org.jeecg.modules.wxuser.entity.WxAppConfig;
 import org.jeecg.modules.wxuser.entity.WxUser;
 import org.jeecg.modules.wxuser.mapper.UserInfoMapper;
@@ -37,10 +36,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import java.util.Date;
 import java.util.UUID;
-import java.util.concurrent.TimeUnit;
 
 /**
  * @Description: user_info
@@ -49,7 +45,7 @@ import java.util.concurrent.TimeUnit;
  * @Version: V1.0
  */
 @Service
-public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements IUserInfoService {
+public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, MallUserInfo> implements IUserInfoService {
 @Resource
 private IWxAppConfigService wxAppConfigService;
     @Resource
@@ -65,7 +61,7 @@ private IWxAppConfigService wxAppConfigService;
      * @return
      */
     @Transactional(rollbackFor = Exception.class)
-    public UserInfo loginMa(LoginDto dto) {
+    public MallUserInfo loginMa(LoginDto dto) {
         LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
         lambdaQueryWrapper.eq(WxAppConfig::getAppId, dto.getAppId());
         WxAppConfig wxApp = wxAppConfigService.getOne(lambdaQueryWrapper);
@@ -99,7 +95,7 @@ private IWxAppConfigService wxAppConfigService;
             throw new JeecgBootException("小程序获取登录后的微信用户失败:" + e.getMessage());
         }
         System.out.println("【授权登录前】" + wxUser.toString());
-        UserInfo userInfo;
+        MallUserInfo userInfo;
         if (wxUser == null || StrUtil.isBlank(wxUser.getId())) {
             //新增微信用户
             wxUser.setAppId(wxApp.getId());
@@ -110,7 +106,7 @@ private IWxAppConfigService wxAppConfigService;
         if (StrUtil.isNotBlank(wxUser.getUserId())) {
             userInfo = baseMapper.selectById(wxUser.getUserId());
         } else {
-            userInfo = new UserInfo();
+            userInfo = new MallUserInfo();
         }
         System.out.println("【用户信息】" + userInfo.toString());
 
@@ -137,7 +133,7 @@ private IWxAppConfigService wxAppConfigService;
      * @param dto
      * @return
      */
-    public UserInfo loginByPhoneMa(WxOpenDataDto dto,String token) {
+    public MallUserInfo loginByPhoneMa(WxOpenDataDto dto, String token) {
         ThirdSession thirdSession = ThirdSessionHolder.getThirdSession();
         String key = CommonConstant.PREFIX_WX_APP_USER_TOKEN + token;
         dto.setSessionKey(thirdSession.getSessionKey());
@@ -164,18 +160,18 @@ private IWxAppConfigService wxAppConfigService;
             throw new JeecgBootException("微信小程序授权拉取手机号码:" + e.getMessage());
         }
         //通过手机号登录
-        UserInfo userInfo = loginByMobileWx(thirdSession, phone, key);
+        MallUserInfo userInfo = loginByMobileWx(thirdSession, phone, key);
         return userInfo;
     }
 
 
     @Transactional(rollbackFor = Exception.class)
-    public UserInfo loginByMobileWx(ThirdSession thirdSession, String mobile, String key) {
+    public MallUserInfo loginByMobileWx(ThirdSession thirdSession, String mobile, String key) {
         //先查询该手机号是不是商城用户
-        UserInfo userInfo = baseMapper.selectOne(Wrappers.<UserInfo>lambdaQuery()
-                .eq(UserInfo::getMobile, mobile));
+        MallUserInfo userInfo = baseMapper.selectOne(Wrappers.<MallUserInfo>lambdaQuery()
+                .eq(MallUserInfo::getMobile, mobile));
         if (userInfo == null) {//不是商城用户,则新增
-            userInfo = new UserInfo();
+            userInfo = new MallUserInfo();
             userInfo.setCreateTime(DateTime.now());
             userInfo.setUpdateTime(DateTime.now());
         }

+ 1 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/dto/BookingOrderSaveDto.java

@@ -31,4 +31,5 @@ public class BookingOrderSaveDto  {
     private String phone;
     // 确认入住
     private Boolean confirm;
+    private String hotelId;
 }

+ 31 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/mapper/BusHotelMapper.java

@@ -1,10 +1,15 @@
 package org.jeecg.modules.business.mapper;
 
+import java.util.HashMap;
 import java.util.List;
 
+import cn.hutool.core.date.DateTime;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.business.entity.BusHotel;
+import org.jeecg.modules.business.entity.BusRoomPayType;
 
 /**
  * @Description: bus_hotel
@@ -14,4 +19,30 @@ import org.jeecg.modules.business.entity.BusHotel;
  */
 public interface BusHotelMapper extends BaseMapper<BusHotel> {
 
+    /**
+     * 可入住酒店列表
+     * @param page
+     * @param tenantId 租户id
+     * @param keyWord 关键字
+     * @param sort 0推荐排序 1 距离优先 2低价优先 3评分优先 4评论数优先
+     * @return
+     */
+    @Select("<script>SELECT h.*, ROUND(6378.138*2*ASIN(SQRT(power(SIN((28.205783*PI()/180-(h.lat)*PI()/180)/2),2)+COS(28.205783*PI()/180)*COS((h.lat)*PI()/180)*power(SIN((112.986861*PI()/180-(h.lng)*PI()/180)/2),2)))*1000,2)  AS distance,ifnull(c.commentNum,0) as commentNum,ifnull(c.score,0) as score,ifnull(market_price,0) as market_price FROM bus_hotel_info h\n" +
+            "left join (select hotel_id,count(0) as commentNum,AVG(score) as score from ces_order_comment where comment_type=1 group by hotel_id) c\n" +
+            "on c.hotel_id=h.id\n" +
+            "left join (select hotel_id,min(market_price) as market_price from ces_room_layout where invalid=0 group by hotel_id) l\n" +
+            "on l.hotel_id=h.id\n" +
+            "where h.del_flag=0 and h.`status`=1 and h.check_status=1\n" +
+            "<if test='tenantId != null and tenantId !=\"\"'> and h.tenant_id = '${tenantId}' </if>" +
+            "<if test='keyWord != null and keyWord !=\"\"'> and (h.address LIKE concat(concat('%',#{keyWord}),'%') or h.name LIKE concat(concat('%',#{keyWord}),'%')) </if>" +
+            "<if test='sort != null and sort ==0'> order by h.create_time desc </if>" +
+            "<if test='sort != null and sort ==1'> order by distance asc </if>" +
+            "<if test='sort != null and sort ==2'> order by market_price asc </if>" +
+            "<if test='sort != null and sort ==3'> order by score desc </if>" +
+            "<if test='sort != null and sort ==4'> order by commentNum desc </if>" +
+            "</script>")
+    public List<BusHotel> pageList(Page<BusHotel> page,@Param("tenantId") String tenantId, @Param("keyWord") String keyWord, @Param("sort") Integer sort);
+
 }
+
+

+ 11 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/IBusHotelService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.business.service;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.business.entity.BusHotel;
@@ -24,4 +25,14 @@ public interface IBusHotelService extends IService<BusHotel> {
      * @param busHotel 酒店
      */
     public Result<?>  editHotelInfo(BusHotel busHotel);
+
+    /**
+     * 可入住酒店列表
+     * @param page
+     * @param tenantId
+     * @param keyWord
+     * @param sort 0推荐排序 1 距离优先 2低价优先 3评分优先 4评论数优先
+     * @return
+     */
+    public Page<BusHotel> pageList(Page<BusHotel> page, String tenantId, String keyWord, Integer sort);
 }

+ 17 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusHotelServiceImpl.java

@@ -1,10 +1,13 @@
 package org.jeecg.modules.business.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CacheConstant;
 import org.jeecg.common.system.util.JwtUtil;
@@ -13,6 +16,7 @@ import org.jeecg.common.util.PasswordUtil;
 import org.jeecg.common.util.TokenUtils;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.business.entity.BusHotel;
+import org.jeecg.modules.business.entity.BusRoomPayType;
 import org.jeecg.modules.business.mapper.BusHotelMapper;
 import org.jeecg.modules.business.service.IBusHotelService;
 import org.jeecg.modules.rooms.entity.CesAllDayPriceRule;
@@ -28,6 +32,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -38,7 +43,7 @@ import java.util.List;
  */
 @Service
 public class BusHotelServiceImpl extends ServiceImpl<BusHotelMapper, BusHotel> implements IBusHotelService {
-    @Autowired
+    @Resource
     private BusHotelMapper busHotelMapper;
 
     @Resource
@@ -101,4 +106,15 @@ public class BusHotelServiceImpl extends ServiceImpl<BusHotelMapper, BusHotel> i
         return Result.ok("信息编辑成功!");
     }
 
+    /**
+     * 可入住酒店列表
+     * @param page
+     * @param tenantId
+     * @param keyWord
+     * @param sort 0推荐排序 1 距离优先 2低价优先 3评分优先 4评论数优先
+     * @return
+     */
+    public Page<BusHotel> pageList(Page<BusHotel> page, String tenantId, String keyWord, Integer sort) {
+        return page.setRecords(this.busHotelMapper.pageList(page, tenantId, keyWord, sort));
+    }
 }

+ 6 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/controller/SummaryController.java

@@ -224,15 +224,17 @@ public class SummaryController {
 
 	@ApiOperation(value = "按房间统计当日收入明细列表", notes = "按房间统计当日收入明细列表")
 	@GetMapping(value = "/roomStatDetailList")
-	public Result<List<RoomStatVo>> getRoomStatDetailList(@RequestParam String hotelId) {
-		List<RoomStatVo> list = summaryService.roomStatList(hotelId);
+	public Result<List<RoomStatVo>> getRoomStatDetailList(@RequestParam String hotelId, @RequestParam(name = "startTime", required = true) @JsonFormat(pattern = "yyyy-MM-dd")  @DateTimeFormat(pattern="yyyy-MM-dd") DateTime startTime,
+														  @RequestParam(name = "endTime", required = true) @JsonFormat(pattern = "yyyy-MM-dd")  @DateTimeFormat(pattern="yyyy-MM-dd") DateTime endTime) {
+		List<RoomStatVo> list = summaryService.roomStatList(hotelId, startTime, endTime);
 		return Result.OK(list);
 	}
 
 	@ApiOperation(value = "按时间统计当日收入明细列表", notes = "按时间统计当日收入明细列表")
 	@GetMapping(value = "/dayOrderFeeList")
-	public Result<List<HashMap<String,Object>>> getDayOrderFeeList(@RequestParam String hotelId) {
-		List<HashMap<String, Object>> list = summaryService.dayOrderFeeList(hotelId);
+	public Result<List<HashMap<String,Object>>> getDayOrderFeeList(@RequestParam String hotelId, @RequestParam(name = "startTime", required = true) @JsonFormat(pattern = "yyyy-MM-dd")  @DateTimeFormat(pattern="yyyy-MM-dd") DateTime startTime,
+																   @RequestParam(name = "endTime", required = true) @JsonFormat(pattern = "yyyy-MM-dd")  @DateTimeFormat(pattern="yyyy-MM-dd") DateTime endTime) {
+		List<HashMap<String, Object>> list = summaryService.dayOrderFeeList(hotelId, startTime, endTime);
 		return Result.OK(list);
 	}
 

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

@@ -618,9 +618,11 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "<if test='hotelId != null and hotelId !=\"\"'> and b.hotel_id = '${hotelId}' </if>" +
             "and b.fee_type=2 and b.preferential_status=2 and b.subject_type!=4\n" +
             "-- and b.subject_type!=5\n" +
-            "and datediff(b.create_time,now())=0\n" +
+            "-- and datediff(b.create_time,now())=0\n" +
+            "<if test='startTime != null'> and b.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and b.create_time &lt;= '${endTime}' </if>" +
             "group by b.room_id</script>")
-    public List<RoomStatVo> roomStatList(@Param("hotelId") String hotelId);
+    public List<RoomStatVo> roomStatList(@Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
     /**
      * 按房间统计当日收入明细列表
@@ -634,10 +636,12 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "on b.pay_type=p.id\n" +
             "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" +
+            "/* and datediff(b.create_time,now())=0 */\n" +
             "<if test='roomId != null and roomId !=\"\"'> and b.room_id = '${roomId}' </if>" +
+            "<if test='startTime != null'> and b.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and b.create_time &lt;= '${endTime}' </if>" +
             "</script>")
-    public List<HashMap<String, Object>> roomStatDeatilList(@Param("roomId") String roomId);
+    public List<HashMap<String, Object>> roomStatDeatilList(@Param("roomId") String roomId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
     /**
      * 按时间统计当日收入明细列表
@@ -654,15 +658,20 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "where 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and b.hotel_id = '${hotelId}' </if>" +
             "and b.fee_type=2 and b.preferential_status=2 and subject_type!=4\n" +
-            "and datediff(b.create_time,now())=0" +
+            "/* and datediff(b.create_time,now())=0 */" +
+            "<if test='startTime != null'> and b.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and b.create_time &lt;= '${endTime}' </if>" +
             "UNION ALL\n" +
             "select b.create_time,b.pay_money as money,'--' as room_name,'点餐' as subject_type_name,p.name as pay_name from pos_order_goods_payment b\n" +
             "left join bus_room_pay_type_info p\n" +
             "on b.payment_method=p.id\n" +
             "where 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and b.hotel_id = '${hotelId}' </if>" +
-            "and datediff(b.create_time,now())=0</script>")
-    public List<HashMap<String, Object>> dayOrderFeeList(@Param("hotelId") String hotelId);
+            "/* and datediff(b.create_time,now())=0 */" +
+            "<if test='startTime != null'> and b.create_time &gt;= '${startTime}' </if>" +
+            "<if test='endTime != null'> and b.create_time &lt;= '${endTime}' </if>" +
+            "</script>")
+    public List<HashMap<String, Object>> dayOrderFeeList(@Param("hotelId") String hotelId, @Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime);
 
     /**
      * 按收款方式统计当日收入明细列表
@@ -712,7 +721,7 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "on b.room_id=room.id\n" +
             "where 1=1\n" +
             "<if test='hotelId != null and hotelId !=\"\"'> and b.hotel_id = '${hotelId}' </if>" +
-            "and b.fee_type=2 and b.preferential_status=2 and p.subject_type=5\n" +
+            "and b.fee_type=2 and b.preferential_status=2 and b.subject_type=5\n" +
             "and b.custorer_order_remark='结账退款'\n" +
             "and datediff(b.create_time,now())=0</script>")
     public List<HashMap<String, Object>> dayExpendOrderFeeList(@Param("hotelId") String hotelId);
@@ -728,7 +737,7 @@ public interface SummaryMapper extends BaseMapper<PosOrderGoodsPayment> {
             "left join ces_rooms room\n" +
             "on b.room_id=room.id\n" +
             "where 1=1\n" +
-            "and b.fee_type=2 and b.preferential_status=2 and p.subject_type=5\n" +
+            "and b.fee_type=2 and b.preferential_status=2 and b.subject_type=5\n" +
             "and b.custorer_order_remark='结账退款'\n" +
             "and datediff(b.create_time,now())=0\n" +
             "<if test='payType != null and payType !=\"\"'> and b.pay_type = '${payType}' </if>" +

+ 2 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/service/ISummaryService.java

@@ -108,14 +108,14 @@ public interface ISummaryService extends IService<PosOrderGoodsPayment> {
      * @param hotelId
      * @return
      */
-    public List<RoomStatVo> roomStatList(String hotelId);
+    public List<RoomStatVo> roomStatList(String hotelId, DateTime startTime,DateTime endTime);
 
     /**
      * 按时间统计当日收入明细列表
      * @param hotelId
      * @return
      */
-    public List<HashMap<String, Object>> dayOrderFeeList(String hotelId);
+    public List<HashMap<String, Object>> dayOrderFeeList(String hotelId, DateTime startTime,DateTime endTime);
 
     /**
      * 按收款方式统计当日收入明细列表

+ 5 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/finance/service/impl/SummaryServiceImpl.java

@@ -208,11 +208,11 @@ public class SummaryServiceImpl extends ServiceImpl<SummaryMapper, PosOrderGoods
      * @param hotelId
      * @return
      */
-    public List<RoomStatVo> roomStatList(String hotelId) {
-        List<RoomStatVo> list = summaryMapper.roomStatList(hotelId);
+    public List<RoomStatVo> roomStatList(String hotelId,  DateTime startTime,  DateTime endTime) {
+        List<RoomStatVo> list = summaryMapper.roomStatList(hotelId, startTime, endTime);
         if (ObjectUtils.isNotEmpty(list)) {
             for (RoomStatVo roomStatVo : list) {
-                List<HashMap<String, Object>> detailList = summaryMapper.roomStatDeatilList(roomStatVo.getRoomId());
+                List<HashMap<String, Object>> detailList = summaryMapper.roomStatDeatilList(roomStatVo.getRoomId(), startTime, endTime);
                 roomStatVo.setDetailList(detailList);
             }
         }
@@ -224,8 +224,8 @@ public class SummaryServiceImpl extends ServiceImpl<SummaryMapper, PosOrderGoods
      * @param hotelId
      * @return
      */
-    public List<HashMap<String, Object>> dayOrderFeeList(String hotelId){
-        return summaryMapper.dayOrderFeeList(hotelId);
+    public List<HashMap<String, Object>> dayOrderFeeList(String hotelId,  DateTime startTime,  DateTime endTime){
+        return summaryMapper.dayOrderFeeList(hotelId, startTime, endTime);
     }
 
     /**