Browse Source

Merge branch 'master' of https://e.coding.net/chuanghaikeji/jinganxiangsu/Homestay_app_houtai

lijie 2 years ago
parent
commit
8eade97881
57 changed files with 992 additions and 166 deletions
  1. 3 0
      mhotel/src/com/happy/Model/BookingComment.java
  2. 41 0
      mhotel/src/com/happy/Model/Holiday.java
  3. 90 0
      mhotel/src/com/happy/Until/HolidayUtil.java
  4. 1 0
      mhotel/src/com/happy/Until/HttpUtils.java
  5. 11 0
      mhotel/src/com/happy/Until/TimeExchange.java
  6. 13 1
      mhotel/src/com/happy/action/AppBookingAction.java
  7. 45 1
      mhotel/src/com/happy/action/AppBookingCommentAction.java
  8. 1 1
      mhotel/src/com/happy/action/AppHomePageAction.java
  9. 31 3
      mhotel/src/com/happy/action/AppHotelCouponAction.java
  10. 1 1
      mhotel/src/com/happy/action/AppMePageAction.java
  11. 85 2
      mhotel/src/com/happy/action/HouseNumberStatusAction.java
  12. 1 1
      mhotel/src/com/happy/action/HousePriceAction.java
  13. 38 38
      mhotel/src/com/happy/action/IDCAction.java
  14. 24 9
      mhotel/src/com/happy/action/bookAction.java
  15. 6 4
      mhotel/src/com/happy/action/bookCommentAction.java
  16. 2 1
      mhotel/src/com/happy/action/bookComplainAction.java
  17. 10 1
      mhotel/src/com/happy/action/houseAction.java
  18. 2 2
      mhotel/src/com/happy/dao/BookDao.java
  19. 2 1
      mhotel/src/com/happy/dao/BookingComplainDao.java
  20. 3 2
      mhotel/src/com/happy/dao/HotelCouponDao.java
  21. 1 0
      mhotel/src/com/happy/dao/HouseNumberDao.java
  22. 7 0
      mhotel/src/com/happy/dao/HouseNumberStatusDao.java
  23. 4 0
      mhotel/src/com/happy/dao/UserDao.java
  24. 2 2
      mhotel/src/com/happy/dao/impl/BookImplDao.java
  25. 6 6
      mhotel/src/com/happy/dao/impl/BookingCommentImplDao.java
  26. 18 7
      mhotel/src/com/happy/dao/impl/BookingComplainImplDao.java
  27. 1 1
      mhotel/src/com/happy/dao/impl/HotelCoupomStatusImplDao.java
  28. 50 22
      mhotel/src/com/happy/dao/impl/HotelCouponImplDao.java
  29. 1 1
      mhotel/src/com/happy/dao/impl/HotelImplDao.java
  30. 27 1
      mhotel/src/com/happy/dao/impl/HouseNumberImplDao.java
  31. 73 9
      mhotel/src/com/happy/dao/impl/HouseNumberStatusImplDao.java
  32. 23 0
      mhotel/src/com/happy/dao/impl/UserDaoImpl.java
  33. 5 0
      mhotel/src/com/happy/dto/HouseNumberStatusDto.java
  34. 1 1
      mhotel/src/com/happy/service/BookService.java
  35. 5 4
      mhotel/src/com/happy/service/BookingCommentService.java
  36. 2 1
      mhotel/src/com/happy/service/BookingComplaintService.java
  37. 1 1
      mhotel/src/com/happy/service/FileService.java
  38. 1 1
      mhotel/src/com/happy/service/HotelCoupomService.java
  39. 7 0
      mhotel/src/com/happy/service/HouseNumberService.java
  40. 7 0
      mhotel/src/com/happy/service/HouseNumberStatusService.java
  41. 9 0
      mhotel/src/com/happy/service/UserService.java
  42. 2 2
      mhotel/src/com/happy/service/impl/BookImplService.java
  43. 55 4
      mhotel/src/com/happy/service/impl/BookingCommentImplService.java
  44. 11 8
      mhotel/src/com/happy/service/impl/BookingComplaintImplService.java
  45. 35 3
      mhotel/src/com/happy/service/impl/HotelCoupomImplService.java
  46. 7 0
      mhotel/src/com/happy/service/impl/HouseNumberImplService.java
  47. 41 1
      mhotel/src/com/happy/service/impl/HouseNumberStatusImplService.java
  48. 1 1
      mhotel/src/com/happy/service/impl/HousePriceServiceImpl.java
  49. 12 1
      mhotel/src/com/happy/service/impl/UserServiceImpl.java
  50. 42 0
      mhotel/src/com/happy/vo/BookingComplaintVo.java
  51. 9 0
      mhotel/src/com/happy/vo/CardCouponPageVo.java
  52. 13 21
      mhotel/src/com/happy/vo/CommentDetailsVo.java
  53. 12 0
      mhotel/src/com/happy/vo/PersonageCommentCountVo.java
  54. 20 0
      mhotel/src/com/happy/vo/PersonageCommentVo.java
  55. 41 0
      mhotel/src/com/happy/vo/PersonageDetailsVo.java
  56. 17 0
      mhotel/src/com/happy/vo/UnevaluatedOrder.java
  57. 13 0
      mhotel/src/com/happy/vo/UsefulCouponVo.java

+ 3 - 0
mhotel/src/com/happy/Model/BookingComment.java

@@ -29,6 +29,9 @@ public class BookingComment {
     //    评论订单id
     private String bookingId;
 
+    //    评论订单号
+    private String order_num;
+
     //    评论民宿id
     private String hotelId;
 

+ 41 - 0
mhotel/src/com/happy/Model/Holiday.java

@@ -0,0 +1,41 @@
+package com.happy.Model;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @Description
+ * @Author  raojiaolong
+ * @String 2023-07-29
+ */
+@Data
+@EqualsAndHashCode
+public class Holiday {
+
+
+	private String id;
+
+	/**
+	 * 年份
+	 */
+	private String year;
+
+	/**
+	 * 日期
+	 */
+	private String date;
+
+	/**
+	 * 是否休息日
+     * 节假日休息日:1
+     * 节假日补班:2
+	 */
+	private Integer isRest;
+
+	/**
+	 * 节假日名称
+	 */
+	private String name;
+
+
+}

File diff suppressed because it is too large
+ 90 - 0
mhotel/src/com/happy/Until/HolidayUtil.java


+ 1 - 0
mhotel/src/com/happy/Until/HttpUtils.java

@@ -213,6 +213,7 @@ public class HttpUtils {
 		} catch (ClientProtocolException e) {
 			e.printStackTrace();
 		} catch (IOException e) {
+			System.out.println("退款异常;"+e.getMessage());
 			e.printStackTrace();
 		} finally {
 			try {

+ 11 - 0
mhotel/src/com/happy/Until/TimeExchange.java

@@ -263,6 +263,17 @@ public class TimeExchange {
         return simpleDateFormat.format(nowTime2.getTime());
     }
 
+    public static String getWeek(String sdate) throws ParseException {
+        // 再转换为时间
+        Date date = StringToDate(sdate,"yyyy-MM-dd");
+        Calendar c = Calendar.getInstance();
+        c.setTime(date);
+        // int hour=c.get(Calendar.DAY_OF_WEEK);
+        // hour中存的就是星期几了,其范围 1~7
+        // 1=星期日 7=星期六,其他类推
+        return new SimpleDateFormat("EEEE").format(c.getTime());
+    }
+
     // 今天星期几
     public static String getWeek() throws ParseException {
         String[] weeks = {"7","1","2","3","4","5","6"};

+ 13 - 1
mhotel/src/com/happy/action/AppBookingAction.java

@@ -33,6 +33,7 @@ import java.text.ParseException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 订单进去Action请求交互
@@ -52,7 +53,10 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
     public AppBookService appBookService;
     @Resource
     public AdminManagerService adminManagerService;
-
+    @Resource
+    public HouseNumberStatusService houseNumberStatusService;
+    @Resource
+    public HouseNumberService houseNumberService;
     @Resource
     public HotelCoupomService hotelCoupomService;
     @Resource
@@ -237,6 +241,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
                 List<HotelCouponStatus> list = hotelCoupomStatusService.getBookingId(booking.getId() + "");
                 if (list != null && list.size() > 0) {
                     hotelCoupomStatusService.restitution(list);
+                    System.out.println("返回优惠券");
                 }
                 System.out.println("已将订单" + booking.getOrderNum() + "标识为支付超时");
 
@@ -649,6 +654,11 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
             String retXml = JaxbUtil.getRequestXml(params);
             String msg = HttpUtils.post("https://api.mch.weixin.qq.com/pay/refundquery", retXml);
             if (msg.indexOf("<refund_status_0><![CDATA[SUCCESS]]></refund_status_0>")>0) {
+                //退款的数据删除一下房态删除
+                String sql = " and booking_id = " + book.getId();
+                List<HouseNumberStatus> houseNumberStatuse = houseNumberStatusService.getList(sql);
+                houseNumberStatusService.updateHouseNumberStatus(String.valueOf(book.getId()));
+
                 // 退款成功,将数据写入本地数据库
                 book.setRefundTime(DateUtil.parseDateToStr(new Date(),DateUtil.Time_Formatter_Second));
                 book.setRefundAmount(book.getHouseTotalPrice());
@@ -847,8 +857,10 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
                 //通过订单id找到所属优惠券
                 List<HotelCouponStatus> hotelCouponStatusList = hotelCoupomStatusService.getBookingId(bookingId);
                 if (hotelCouponStatusList != null && hotelCouponStatusList.size() > 0) {
+                    System.out.println("进入核销优惠券");
                     for (HotelCouponStatus hotelCouponStatus : hotelCouponStatusList) {
                         String complaintId = hotelCouponStatus.getComplaintId();
+                        System.out.println("核销优惠券id"+complaintId);
                         HotelCoupon hotelCoupon = hotelCoupomService.getById(complaintId);
                         if (hotelCoupon!=null) {
                             Integer reversedNumber = hotelCoupon.getReversedNumber();

+ 45 - 1
mhotel/src/com/happy/action/AppBookingCommentAction.java

@@ -8,6 +8,7 @@ import com.happy.dto.HotelEto;
 import com.happy.dto.IPage;
 import com.happy.dto.OrderRateDto;
 import com.happy.service.BookingCommentService;
+import com.happy.service.UserService;
 import com.happy.vo.*;
 import com.opensymphony.xwork2.ActionSupport;
 import com.alibaba.fastjson.JSONObject;
@@ -56,10 +57,11 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
         this.response = response;
     }
 
-
     @Resource
     public BookingCommentService bookingCommentService;
 
+    @Resource
+    public UserService userService;
 
     //    回复评论id
     public String commentId;
@@ -296,6 +298,16 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
         this.usersId = usersId;
     }
 
+    public Integer userId;
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
     /**
      * 添加评论
      */
@@ -343,6 +355,7 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
 
 
         if (a > 0) {
+
             jsonObject.put("code", 200);
             jsonObject.put("message", "添加成功");
             jsonObject.put("success", true);
@@ -356,6 +369,35 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
         return null;
     }
 
+    public JSONObject unevaluatedOrder(){
+        JSONObject jsonObject = new JSONObject();
+        if (page <= 0 || rows <= 0) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入page,rows数据---unevaluatedOrder");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+        if (Func.checkNull(hotelId)||Func.checkNull(userId+"")) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入hotelId,usersId数据---unevaluatedOrder");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        UnevaluatedOrder vo=userService.collect(hotelId,userId);
+        IPage<PersonageCommentVo> iPage = bookingCommentService.personageComment(0, userId+"", page, rows);
+        vo.setPage(iPage);
+
+        jsonObject.put("code", 200);
+        jsonObject.put("message", "查看成功");
+        jsonObject.put("success", true);
+        jsonObject.put("data", vo);
+        ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+        return null;
+    }
+
 
     /**
      * 评价列表
@@ -514,11 +556,13 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
 
 
         IPage ipage=bookingCommentService.personageComment(status, usersId, page, rows);
+        PersonageCommentCountVo vo=bookingCommentService.personageCommentCount(usersId);
 
         jsonObject.put("code", 200);
         jsonObject.put("message", "成功");
         jsonObject.put("success", true);
         jsonObject.put("page", ipage);
+        jsonObject.put("data", vo);
         ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
 
         return null;

+ 1 - 1
mhotel/src/com/happy/action/AppHomePageAction.java

@@ -255,7 +255,7 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
             }
             houseData.setPrice(todayPrice.doubleValue());
             if(dateStrs.size() > 0){
-                houseData.setPrice(houseData.getPrice() == 0.0 ? 0.0 : (houseData.getPrice() / dateStrs.size()));
+                houseData.setPrice(houseData.getPrice() == 0.0 ? 0.0 : (new BigDecimal(houseData.getPrice()).divide(new BigDecimal(dateStrs.size())).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()));
             }
         }
         //endregion

+ 31 - 3
mhotel/src/com/happy/action/AppHotelCouponAction.java

@@ -14,6 +14,7 @@ import com.opensymphony.xwork2.ActionSupport;
 import net.sf.json.JSONObject;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.interceptor.ServletRequestAware;
+import org.springframework.util.ObjectUtils;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -139,6 +140,16 @@ public class AppHotelCouponAction extends ActionSupport implements ServletReques
         this.bookingId = bookingId;
     }
 
+    public Double totalPrice;
+
+    public Double getTotalPrice() {
+        return totalPrice;
+    }
+
+    public void setTotalPrice(Double totalPrice) {
+        this.totalPrice = totalPrice;
+    }
+
     @Resource
     BookService bookService;
 
@@ -296,10 +307,10 @@ public class AppHotelCouponAction extends ActionSupport implements ServletReques
     public JSONObject usefulCoupon() {
         JSONObject jsonObject = new JSONObject();
 
-        if (Func.checkNull(hotelId) && Func.checkNull(userId)) {
+        if (Func.checkNull(hotelId) || Func.checkNull(userId) || totalPrice==null) {
             jsonObject.put("code", 400);
             jsonObject.put("success", false);
-            jsonObject.put("message", "缺少数据hotelId或userId---usefulCoupon");
+            jsonObject.put("message", "缺少数据hotelId,userId,totalPrice---usefulCoupon");
             ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
             return null;
         }
@@ -312,7 +323,7 @@ public class AppHotelCouponAction extends ActionSupport implements ServletReques
             return null;
         }
 
-        IPage<UsefulCouponVo> iPage = hotelCoupomService.usefulCoupon(hotelId, userId, page, rows);
+        IPage<UsefulCouponVo> iPage = hotelCoupomService.usefulCoupon(hotelId, userId, page, rows,totalPrice);
 
         jsonObject.put("code", 200);
         jsonObject.put("success", true);
@@ -404,6 +415,23 @@ public class AppHotelCouponAction extends ActionSupport implements ServletReques
             useCouponsVo.setDiscountAmount(deductionPrice);
 
         } else if (2 == type1) {
+            //            满减金额
+            Double meetPrice = hotelCoupon.getMeetPrice();
+            if (meetPrice==null||meetPrice<0) {
+                meetPrice=0.0;
+            }
+            BigDecimal meetPriceBigDecimal = new BigDecimal(meetPrice);
+
+            if (meetPrice > totalPrice) {
+                BigDecimal subtract = meetPriceBigDecimal.subtract(houseTotalPriceBigDecimal);
+                double v = subtract.doubleValue();
+                jsonObject.put("code", 400);
+                jsonObject.put("success", false);
+                jsonObject.put("message", "还差" + v + "元可使用");
+                ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+                return null;
+            }
+
 //            享受的折扣
             Double rebatePrice = hotelCoupon.getRebatePrice();
             BigDecimal rebatePriceBigDecimal = new BigDecimal(rebatePrice/10);

+ 1 - 1
mhotel/src/com/happy/action/AppMePageAction.java

@@ -129,7 +129,7 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
             querySql.append(" and create_userid = '").append(userId).append("' ");
         }
 
-        IPage<Booking> iPage = bookService.queryPage(querySql.toString(), page, rows);
+        IPage<Booking> iPage = bookService.queryPage(querySql.toString(), page, rows, "create_time");
         List<Booking> bookList = iPage.getPageList();
         if (bookList != null) {
             for (Booking book : bookList) {

+ 85 - 2
mhotel/src/com/happy/action/HouseNumberStatusAction.java

@@ -1,6 +1,7 @@
 package com.happy.action;
 
 import com.alibaba.fastjson.JSONObject;
+import com.happy.Model.Holiday;
 import com.happy.Until.GetHttpParam;
 import com.happy.Until.ResUtil;
 import com.happy.common.controller.BaseController;
@@ -13,6 +14,8 @@ import org.apache.struts2.ServletActionContext;
 import javax.annotation.Resource;
 import java.util.List;
 
+import static com.happy.Until.HolidayUtil.getYearHoliday;
+
 public class HouseNumberStatusAction extends BaseController implements ModelDriven<HouseNumberStatusDto> {
     private final HouseNumberStatusDto houseNumberStatusDto = new HouseNumberStatusDto();
 
@@ -23,18 +26,78 @@ public class HouseNumberStatusAction extends BaseController implements ModelDriv
 
     @Resource(name = "HouseNumberStatusService")
     private HouseNumberStatusService houseNumberStatusService;
+
+    /**
+     * 根据年份获取节假日数据
+     */
+    public String queryHoliday() {
+        String year = houseNumberStatusDto.getYear();
+
+        if (year.length() > 4) {
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "请输入年份");
+                put("code", 500);
+            }}.toString());
+            return null;
+        }
+
+        if (year == null) {
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "请传入参数");
+                put("code", 500);
+            }}.toString());
+            return null;
+        }
+
+
+        List<Holiday> days = getYearHoliday("2023");
+
+        if (days == null) {
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "第三方接口调用失败");
+                put("code", 500);
+            }}.toString());
+            return null;
+        }
+
+        if (days.size() <= 0) {
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "第三方接口调用失败");
+                put("code", 500);
+            }}.toString());
+            return null;
+        }
+
+        houseNumberStatusService.deleteHolidayByYear(year);
+
+        int lenegth = houseNumberStatusService.saveHolidayBatch(days);
+        if (lenegth <= 0) {
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "节假日数据存储失败");
+                put("code", 500);
+            }}.toString());
+            return null;
+        }
+
+        ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+            put("message", "节假日数据存储成功");
+            put("code", 200);
+        }}.toString());
+        return null;
+    }
+
     /**
      * 表格数据 房态管理-房态管理
      */
     public void queryData() {
         JSONObject objects = houseNumberStatusService.queryData(houseNumberStatusDto);
-        if (objects != null){
+        if (objects != null) {
             ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
                 put("message", "请求成功");
                 put("code", 200);
                 put("data", objects);
             }}.toString());
-        }else {
+        } else {
             ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
                 put("message", "该房型未新增房间号");
                 put("code", 200);
@@ -61,6 +124,26 @@ public class HouseNumberStatusAction extends BaseController implements ModelDriv
     public void modifyStatusBatch() {
         String postDataStr = GetHttpParam.getRequestPostData(request);
         HouseNumberStatusDto postDataObj = JSONObject.parseObject(postDataStr, HouseNumberStatusDto.class);
+        //2023-09-20 A-jax 参数判断
+        if(postDataObj.getHouseNumberIds() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "房间不能为空");
+                put("code", 500);
+            }}.toString());
+        }
+        if(postDataObj.getCreateId() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "关房类型不能为空");
+                put("code", 500);
+            }}.toString());
+        }
+        if(postDataObj.getSetDate() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "日期不能为空");
+                put("code", 500);
+            }}.toString());
+        }
+
         houseNumberStatusService.modifyStatusBatch(postDataObj);
         ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
             put("message", "请求成功");

+ 1 - 1
mhotel/src/com/happy/action/HousePriceAction.java

@@ -358,7 +358,7 @@ public class HousePriceAction extends BaseController implements ModelDriven<Hous
                 data.setTopinfo("离店时间");
             }else{
                 if (datas.size() > 0) {
-                    data.setTopinfo("11晚 共" + datas.get(0).getPrice());
+                    data.setTopinfo("1晚 共" + datas.get(0).getPrice());
                     dpv.setTotalPrice((dpv.getTotalPrice() == null ? 0 : dpv.getTotalPrice()) + datas.get(0).getPrice());
                 } else {
                     data.setTopinfo("1晚 共" + housePrice);

+ 38 - 38
mhotel/src/com/happy/action/IDCAction.java

@@ -66,12 +66,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
     public String getBookStatusData(){
         JSONObject resultJson = new JSONObject();
         List<IDCBookStatusEto> list = idcService.getBookStatusData();
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", list);
@@ -86,12 +86,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
     public String getHotelData() {
         JSONObject resultJson = new JSONObject();
         List<IDCHotelEto> list = idcService.getHotelData();
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", list);
@@ -116,15 +116,15 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
             sqlx.append("AND DATE_FORMAT(pay_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
         }
         List<IDCRankEto> list = idcService.getRankBookNumData(sqlx.toString());
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
-        resultJson.put("data", list);
+        resultJson.put("data", list == null ? new ArrayList<>() : list);
         ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
         return null;
     }
@@ -146,15 +146,15 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
             sqlx.append("AND DATE_FORMAT(pay_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
         }
         List<IDCRankEto> list = idcService.getRankSalesAmountData(sqlx.toString());
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
-        resultJson.put("data", list);
+        resultJson.put("data", list == null ? new ArrayList<>() : list);
         ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
         return null;
     }
@@ -167,12 +167,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
         JSONObject resultJson = new JSONObject();
 
         IDCSum idcSum = idcService.getSumData();
-        if (idcSum == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (idcSum == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", idcSum);
@@ -192,12 +192,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
     {
         JSONObject resultJson = new JSONObject();
         UserVisits info = userVisitsDao.queryTodayUserVisits();
-        if (info == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (info == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
 
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);

+ 24 - 9
mhotel/src/com/happy/action/bookAction.java

@@ -18,6 +18,7 @@ import org.apache.struts2.interceptor.ServletRequestAware;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.text.ParseException;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -129,13 +130,18 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
                     List<String> Ids = new ArrayList<>();
                     AtomicInteger i = new AtomicInteger();
                     if (houseNumbers != null){
-                        houseNumberList.forEach(houseNumber -> {
-                            //添加的房间不在不可添加的房间当中并且数量小于订房总数
-                            if (!houseNumbers.contains(houseNumber) && i.get() < book.getHouseOrderNumber()){
+//                        houseNumberList.forEach(houseNumber -> {
+//                            //添加的房间不在不可添加的房间当中并且数量小于订房总数
+//
+//                        });
+                        List<String> houseStrs = houseNumbers.stream().map(HouseNumber::getId).collect(Collectors.toList());
+                        for (HouseNumber houseNumber: houseNumberList) {
+                            if (!houseStrs.contains(houseNumber.getId()) && i.get() < book.getHouseOrderNumber()){
                                 Ids.add(houseNumber.getId());
                                 i.getAndIncrement();
                             }
-                        });
+                        }
+
                     }else {
                         //所有房间都可以预定
                         houseNumberList.forEach(houseNumber -> {
@@ -169,8 +175,15 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
                         ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
                         return null;
                     }
-                    List<HouseNumber> houseNumbers1 = houseNumberService.queryHouseStatus(book);
                     List<String> ids = Arrays.asList(houseNumberIds.split(","));
+                    if(book.getHouseOrderNumber() != ids.size()){
+                        resultJson.put("message", "房间数不一致");
+                        resultJson.put("code", 502);
+                        ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+                        return null;
+                    }
+                    List<HouseNumber> houseNumbers1 = houseNumberService.queryHouseStatus(book);
+
                     if (houseNumbers1!=null){
                         for (String id: ids){
                             for (HouseNumber houseNumber: houseNumbers1){
@@ -263,7 +276,8 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
                         ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
                         return null;
                     }
-                    resultJson.put("message", msg+"成功"+",推送消息失败,原因:"+errmsg);
+                    //resultJson.put("message", msg+"成功"+",推送消息失败,原因:"+errmsg);
+                    resultJson.put("message", "接单成功,因用户未订阅小程序消息,无法推送消息,请通过电话或者短信通知旅客!");
                     resultJson.put("code", 500);
                     ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
                     return null;
@@ -339,9 +353,10 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
             s1.append(" and DATE_FORMAT(pay_time,'%Y-%m-%d') >= '").append(payStartTime).append("'")
                     .append(" and DATE_FORMAT(pay_time,'%Y-%m-%d') <= '").append(payEndTime).append("'");
         }
-        IPage<Booking> bookIPage = bookService.queryPage(s1.toString(),page,rows);
+        IPage<Booking> bookIPage = bookService.queryPage(s1.toString(),page,rows,"create_time");
         //获取订单汇总信息
         BookTypeEto bookTypeEto = bookService.getBookStatusSum(s1.toString());
+        bookTypeEto.setSumAccount(new BigDecimal(bookTypeEto.getSumAccount()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
         bookTypeEto.setBookIPage(bookIPage);
 
         if(bookTypeEto!=null && !"".equals(bookTypeEto)){
@@ -463,7 +478,7 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
         if(maxTotalPrice!=null){
             s1.append(" and house_total_price <= '").append(maxTotalPrice).append("'");
         }
-        IPage<Booking> bookIPage = bookService.queryPage(s1.toString(),page,rows);
+        IPage<Booking> bookIPage = bookService.queryPage(s1.toString(),page,rows, "check_out_time");
         //获取订单汇总信息
         BookTypeEto bookTypeEto = bookService.getBookStatusSum(s1.toString());
         bookTypeEto.setBookIPage(bookIPage);
@@ -493,7 +508,7 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
             return null;
         }
         Booking book = bookService.getById(id);
-        List<HouseNumber> houseNumbers = houseNumberService.queryHouseStatus(book);
+        List<HouseNumber> houseNumbers = houseNumberService.queryCheckRoom(book);
         book.setHouseNumbers(houseNumbers);
         if (book != null) {
             resultJson.put("message", "查询成功");

+ 6 - 4
mhotel/src/com/happy/action/bookCommentAction.java

@@ -57,8 +57,8 @@ public class bookCommentAction extends BaseController implements ServletRequestA
             s2.append(" or a.createName like '%").append(keywords).append("%')");
         }
         if (score != null){
-            s1.append(" and a.score >= ").append(score).append(" ");
-            s2.append(" and a.score >= ").append(score).append(" ");
+            s1.append(" and a.score = ").append(score).append(" ");
+            s2.append(" and a.score = ").append(score).append(" ");
         }
         if (commentStartTime != null){
             s1.append(" and DATE_FORMAT(a.create_date, '%Y-%m-%d') >= '").append(commentStartTime).append("' ");
@@ -70,16 +70,18 @@ public class bookCommentAction extends BaseController implements ServletRequestA
         }
         if (checkoutStartTime != null){
             s1.append(" and DATE_FORMAT(b.check_out_time, '%Y-%m-%d') >= '").append(checkoutStartTime).append("' ");
-            s2.append(" and DATE_FORMAT(a.check_out_time, '%Y-%m-%d') >= '").append(checkoutStartTime).append("' ");
+            s2.append(" and DATE_FORMAT(a.checkOutTime, '%Y-%m-%d') >= '").append(checkoutStartTime).append("' ");
         }
         if (checkoutEndTime != null){
             s1.append(" and DATE_FORMAT(b.check_out_time, '%Y-%m-%d') <= '").append(checkoutEndTime).append("' ");
-            s2.append(" and DATE_FORMAT(a.check_out_time, '%Y-%m-%d') <= '").append(checkoutEndTime).append("' ");
+            s2.append(" and DATE_FORMAT(a.checkOutTime, '%Y-%m-%d') <= '").append(checkoutEndTime).append("' ");
         }
         if (status != null){
             s1.append(" and a.comment_status = ").append(status).append(" ");
             s2.append(" and a.comment_status = ").append(status).append(" ");
         }
+        System.out.println(s1.toString());
+        System.out.println(s2.toString());
         IPage<BookingComment> list = bookingCommentService.queryPage(s1.toString(),s2.toString(), page, rows);
         if(list != null && !"".equals(list)){
             resultJson.put("message", "查询分页成功");

+ 2 - 1
mhotel/src/com/happy/action/bookComplainAction.java

@@ -14,6 +14,7 @@ import com.happy.service.BookingComplaintService;
 import com.happy.service.HotelCoupomStatusService;
 import com.happy.service.HotelService;
 import com.happy.service.HouseService;
+import com.happy.vo.BookingComplaintVo;
 import net.sf.json.JSONObject;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.interceptor.ServletRequestAware;
@@ -65,7 +66,7 @@ public class bookComplainAction extends BaseController implements ServletRequest
             s1.append(" and DATE_FORMAT(a.create_date, '%Y-%m-%d') <= '").append(complainEndTime).append("' ");
             s2.append(" and DATE_FORMAT(create_date, '%Y-%m-%d') <= '").append(complainEndTime).append("' ");
         }
-        IPage<BookingComplaint> bookingComplaintIPage = bookingComplaintService.queryPage(s1.toString(),s2.toString(), page, rows);
+        IPage<BookingComplaintVo> bookingComplaintIPage = bookingComplaintService.queryPage(s1.toString(),s2.toString(), page, rows);
         if(bookingComplaintIPage!=null && !"".equals(bookingComplaintIPage)){
             resultJson.put("message", "查询分页成功");
             resultJson.put("code", 200);

+ 10 - 1
mhotel/src/com/happy/action/houseAction.java

@@ -187,6 +187,16 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
                 ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
                 return null;
             }
+
+            //2023-09-19 A-jax 房型数量必须和房间数量一致
+            List<String> houseNumberList = Arrays.asList(houseNumber.split(","));
+            if(house.getNumber().intValue() != houseNumberList.size()){
+                resultJson.put("message", "房型数量与房间数量不一致");
+                resultJson.put("code", 500);
+                ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+                return null;
+            }
+
             if (house.getId() == null) {
                 resultJson.put("message", "房型Id为空");
                 resultJson.put("code", 500);
@@ -220,7 +230,6 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
                 return null;
             }
             //验证成功修改房号表
-            List<String> houseNumberList = Arrays.asList(houseNumber.split(","));
             List<HouseNumber> houseNumbers = new ArrayList<HouseNumber>();
             for (String s : houseNumberList){
                 HouseNumber h1 = new HouseNumber();

+ 2 - 2
mhotel/src/com/happy/dao/BookDao.java

@@ -7,7 +7,7 @@ import com.happy.dto.BookTypeEto;
 import java.util.List;
 
 public interface BookDao {
-    
+
     /**
      * 描述:新增
      * @param book
@@ -43,7 +43,7 @@ public interface BookDao {
      * @param rows
      * @return
      */
-    List<Booking> queryPage(String sqlx, int page, int rows);
+    List<Booking> queryPage(String sqlx, int page, int rows, String orderDesc);
 
 
     /**

+ 2 - 1
mhotel/src/com/happy/dao/BookingComplainDao.java

@@ -3,6 +3,7 @@ package com.happy.dao;
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.HotelCoupon;
 import com.happy.dto.IPage;
+import com.happy.vo.BookingComplaintVo;
 import com.happy.vo.ComplaintPageVo;
 import com.happy.vo.DetailsVo;
 import com.happy.vo.ProgressDetailsVo;
@@ -11,7 +12,7 @@ import java.util.List;
 
 public interface BookingComplainDao {
 
-    List<BookingComplaint> queryPage(String sqlx, int page, int rows);
+    List<BookingComplaintVo> queryPage(String sqlx, int page, int rows);
     List<BookingComplaint> toComplainExcel(String sqlx);
 
     int queryTotal(String sqlx);

+ 3 - 2
mhotel/src/com/happy/dao/HotelCouponDao.java

@@ -3,6 +3,7 @@ package com.happy.dao;
 import com.happy.Model.HotelCoupon;
 import com.happy.vo.*;
 
+import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.List;
 
@@ -78,8 +79,8 @@ public interface HotelCouponDao {
 
     int cardCouponPageTotal(String types, String userId);
 
-    List<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows);
+    List<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows, Double totalPrice, String format);
 
-    int usefulCouponTotal(String hotelId, String userId);
+    int usefulCouponTotal(String hotelId, String userId,Double totalPrice,String format);
 
 }

+ 1 - 0
mhotel/src/com/happy/dao/HouseNumberDao.java

@@ -13,6 +13,7 @@ public interface HouseNumberDao {
 
     List<HouseNumber> queryHouseStatus(Booking book);
 
+    List<HouseNumber> queryCheckRoom(Booking book);
     /**
      * 查询指定房型下的所有非删除状态的房间(脏房/净房)
      */

+ 7 - 0
mhotel/src/com/happy/dao/HouseNumberStatusDao.java

@@ -1,11 +1,18 @@
 package com.happy.dao;
 
+import com.happy.Model.Holiday;
 import com.happy.Model.HouseNumberStatus;
 import com.happy.dto.HouseNumberStatusDto;
 
 import java.util.List;
 
 public interface HouseNumberStatusDao {
+    int deleteHolidayByYear(String year);
+
+    int saveHolidayBatch(List<Holiday> list);
+
+    List<Holiday> queryHolidays(String year, String startDate, String endDates);
+
     int saveBatch(List<HouseNumberStatus> list);
 
     int updateHouseNumberStatus(String bookId);

+ 4 - 0
mhotel/src/com/happy/dao/UserDao.java

@@ -1,6 +1,7 @@
 package com.happy.dao;
 
 import com.happy.Model.weixin.Users;
+import com.happy.vo.UnevaluatedOrder;
 
 import java.util.List;
 
@@ -40,4 +41,7 @@ public interface UserDao {
 
     public int queryUserTotal(String sqlStr);
     public List<Users> queryUserPage(String sqlx, int page, int rows);
+
+    UnevaluatedOrder collect(String hotelId1, Integer createId1);
+
 }

+ 2 - 2
mhotel/src/com/happy/dao/impl/BookImplDao.java

@@ -217,11 +217,11 @@ public class BookImplDao implements BookDao {
     }
 
     @Override
-    public List<Booking> queryPage(String sqlx, int page, int rows) {
+    public List<Booking> queryPage(String sqlx, int page, int rows, String orderDesc) {
         SqlUtil.filterKeyword(sqlx);
 
         int start = (page - 1) * rows;// 每页的起始下标
-        String sql = "SELECT a.*,b.name hotel_township_name,c.hstatus hstatus,c.status hotelStatus FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id left join hotel c on a.hotel_id = c.id WHERE 1=1 "+sqlx+" ORDER BY create_time DESC limit :start,:rows ";
+        String sql = "SELECT a.*,b.name hotel_township_name,c.hstatus hstatus,c.status hotelStatus FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id left join hotel c on a.hotel_id = c.id WHERE 1=1 "+sqlx+" ORDER BY " +orderDesc+ " DESC limit :start,:rows ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("start", start);
         sps.addValue("rows", rows);

+ 6 - 6
mhotel/src/com/happy/dao/impl/BookingCommentImplDao.java

@@ -33,7 +33,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
     }
 
     private String selectSql = "select " +
-            "a.id,a.comment_id,a.comment_parent_id,a.comment_name,a.booking_id,a.hotel_id,a.house_id,a.content,a.comment_status,a.score,a.score_ws," +
+            "a.id,b.order_num,a.comment_id,a.comment_parent_id,a.comment_name,a.booking_id,a.hotel_id,a.house_id,a.content,a.comment_status,a.score,a.score_ws," +
             "a.score_fw,a.score_ss,a.score_wz,a.create_id,a.create_username, DATE_FORMAT(a.create_date, '%Y-%m-%d %H:%i:%s') create_date, DATE_FORMAT(a.modify_date, '%Y-%m-%d %H:%i:%s') modify_date,a.status,DATE_FORMAT(b.check_out_time, '%Y-%m-%d %H:%i:%s') as checkOutTime,c.user_name as createName,b.hotel_manager_id,c.head_photo as headPhoto" +
             " from booking_comment a" +
             " left join booking b on b.id = a.booking_id" +
@@ -339,7 +339,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
     public CommentDetailsVo commentDetails(String bookingCommentId) {
         String sql = "SELECT\n" +
                 "\tbc.id AS id,\n" +
-                "\tbc.create_username AS userName,\n" +
+                "\tu.user_name AS userName,\n" +
                 "\tu.head_photo AS headPhoto,\n" +
                 "\tbc.score AS score,\n" +
                 "\tb.live_time AS liveTime,\n" +
@@ -351,7 +351,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
                 "\t( SELECT round( AVG( score ), 1 ) FROM `booking_comment` WHERE comment_parent_id IS NULL AND `status` = 1 AND hotel_id = bc.hotel_id ) AS hotelScore,\n" +
                 "\thd.`name` AS hotelTownship,\n" +
                 "\tb.hotel_type AS hotelType,\n" +
-                "\tifnull( cc.commentSum, 0 ) AS commentCount ,h.cover_img as coverImg\n" +
+                "\tifnull( cc.commentSum, 0 ) AS commentCount ,h.cover_img as coverImg,b.hotel_id as hotelId \n" +
                 "FROM\n" +
                 "\t`booking_comment` bc\n" +
                 "\tLEFT JOIN users u ON u.id = bc.create_id\n" +
@@ -511,7 +511,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
         int start = (page - 1) * rows;// ÿҳµÄÆðʼÏÂ
         String sql = "SELECT\n" +
                 "\tb.id AS id,\n" +
-                "\tbc.id as bookingCommentId,\n" +
+                "\tbc.id as bookingCommentId ,b.hotel_id as hotelId,b.house_id as houseId,\n" +
                 "\tb.hotel_name AS hotelName,\n" +
                 "\tb.house_order_number AS houseOrderNumber,\n" +
                 "\tb.house_name AS houseName ,\n" +
@@ -639,11 +639,11 @@ public class BookingCommentImplDao implements BookingCommentDao {
                 "\tb.house_name AS houseName ,\n" +
                 "\tb.live_time as liveTime,\n" +
                 "\tb.check_out_time as checkOutTime,\n" +
-                "\tb.pay_account as payAccount\n" +
+                "\tb.pay_account as payAccount,u.user_name as name,u.head_photo as headPhoto , fi4.url as houseUrl ,b.id as bookingId  \n" +
                 "FROM\n" +
                 "\t`booking_comment` bc\n" +
                 "\tLEFT JOIN ( SELECT fi.link_id, GROUP_CONCAT( fi.url ) AS url FROM file_info fi GROUP BY fi.link_id ) fi2 ON fi2.link_id = bc.id\n" +
-                "\tLEFT JOIN booking b on b.id=bc.booking_id and b.status_del=1\n" +
+                "\tLEFT JOIN booking b on b.id=bc.booking_id and b.status_del=1 LEFT JOIN users u on u.id=bc.create_id LEFT JOIN ( SELECT fi3.link_id, GROUP_CONCAT( fi3.url ) AS url FROM file_info fi3 GROUP BY fi3.link_id ) fi4 ON fi4.link_id = b.house_id \n" +
                 "\tWHERE bc.comment_parent_id is NULL AND bc.`status`=1  and bc.id= :bookingCommentId";
 
         MapSqlParameterSource sps = new MapSqlParameterSource();

+ 18 - 7
mhotel/src/com/happy/dao/impl/BookingComplainImplDao.java

@@ -8,6 +8,7 @@ import com.happy.Until.SqlUtil;
 import com.happy.Until.UUIDUtil;
 import com.happy.dao.BookingComplainDao;
 import com.happy.dto.IPage;
+import com.happy.vo.BookingComplaintVo;
 import com.happy.vo.ComplaintPageVo;
 import com.happy.vo.DetailsVo;
 import com.happy.vo.ProgressDetailsVo;
@@ -42,16 +43,26 @@ public class BookingComplainImplDao implements BookingComplainDao {
             " left join users u on a.create_id = u.id " +
             " where a.status != 0 ";
 
+    private String selectLeftSql = "select " +
+            " bk.order_num,u.user_phone as complainPhone,m.corpn_phone as hotelPhone,a.id,a.booking_id,a.hotel_id,a.house_id,a.title,a.content,a.create_id,a.create_date,a.modify_date,/*a.status,*/h.h_name as house_name,h2.hname as hotel_name,(SELECT bcp.progress_type FROM booking_complaint_progress bcp WHERE bcp.complaint_id = a.id ORDER BY bcp.create_date DESC LIMIT 1 ) AS status" +
+            " from booking_complaint a " +
+            " left join house h on a.house_id = h.id " +
+            " left join hotel h2 on a.hotel_id = h2.id "+
+            " left join booking bk on a.booking_id = bk.id"+
+            " left join admin_manager m on h2.manager_id = m.id " +
+            " left join users u on a.create_id = u.id " +
+            " where a.status != 0 ";
+
     @Override
-    public List<BookingComplaint> queryPage(String sqlx, int page, int rows) {
+    public List<BookingComplaintVo> queryPage(String sqlx, int page, int rows) {
         SqlUtil.filterKeyword(sqlx);
         int start = (page - 1) * rows;// 每页的起始下标
-        String sql = selectSql + sqlx + "and a.status != 0"  +" ORDER BY id DESC limit :start,:rows ";
+        String sql = selectLeftSql + sqlx + "and a.status != 0"  +" ORDER BY a.create_date DESC limit :start,:rows ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("start", start);
         sps.addValue("rows", rows);
-        List<BookingComplaint> list = namedParameterJdbcTemplate.query(sql, sps,
-                new BeanPropertyRowMapper<>(BookingComplaint.class));
+        List<BookingComplaintVo> list = namedParameterJdbcTemplate.query(sql, sps,
+                new BeanPropertyRowMapper<>(BookingComplaintVo.class));
         if (list != null && list.size() > 0) return list;
         return null;
     }
@@ -139,11 +150,11 @@ public class BookingComplainImplDao implements BookingComplainDao {
                 "\tb.order_end_time as orderEndTime,\n" +
                 "\tb.pay_account as payAccount,\n" +
                 "\tb.house_order_number as houseOrderNumber,\n" +
-                "\tb.house_name as houseName, fi.url as url, \n" +
+                "\tb.house_name as houseName, fi2.url as url, \n" +
                 "\t( SELECT bcp.progress_type FROM booking_complaint_progress bcp WHERE bcp.complaint_id = bc.id ORDER BY bcp.create_date DESC LIMIT 1 ) AS progressType \n" +
                 "FROM\n" +
                 "\t`booking_complaint` bc\n" +
-                "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1  LEFT JOIN file_info fi on bc.house_id=fi.link_id  where bc.create_id=:usersId limit :start,:rows )bc2 ORDER BY bc2.progressType asc ,bc2.dateTime DESC ";
+                "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1   LEFT JOIN ( SELECT fi.link_id, GROUP_CONCAT( fi.url ) AS url FROM file_info fi GROUP BY fi.link_id ) fi2 ON fi2.link_id = bc.house_id  where bc.create_id=:usersId  )bc2 ORDER BY bc2.progressType asc ,bc2.dateTime DESC limit :start,:rows";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("start", start);
         sps.addValue("rows", rows);
@@ -160,7 +171,7 @@ public class BookingComplainImplDao implements BookingComplainDao {
                 "\t count(1) \n" +
                 "FROM\n" +
                 "\t`booking_complaint` bc\n" +
-                "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1  LEFT JOIN file_info fi on bc.house_id=fi.link_id  where bc.create_id=:usersId ";
+                "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1  LEFT JOIN ( SELECT fi.link_id, GROUP_CONCAT( fi.url ) AS url FROM file_info fi GROUP BY fi.link_id ) fi2 ON fi2.link_id = bc.house_id  where bc.create_id=:usersId ";
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("usersId", usersId);

+ 1 - 1
mhotel/src/com/happy/dao/impl/HotelCoupomStatusImplDao.java

@@ -145,7 +145,7 @@ public class HotelCoupomStatusImplDao implements HotelCoupomStatusDao {
 
     @Override
     public List<HotelCouponStatus> getBookingId(String bookingId) {
-        String sql="select * from hotel_coupon_status where booking_id=:bookingId and status=1 ";
+        String sql="select * from hotel_coupon_status where booking_id=:bookingId  ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("bookingId",bookingId);
         List<HotelCouponStatus> list = null;

+ 50 - 22
mhotel/src/com/happy/dao/impl/HotelCouponImplDao.java

@@ -15,6 +15,7 @@ import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 import org.springframework.stereotype.Repository;
 
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -213,10 +214,10 @@ public class HotelCouponImplDao implements HotelCouponDao {
                 "\thc.deduction_price as deductionPrice,\n" +
                 "\thc.max_deduction AS maxDeduction,\n" +
                 "\thc.meet_price as meetPrice,\n" +
-                "\thc.effective_start_date AS  effectiveStartDate,(SELECT COUNT( hcs.complaint_id ) AS totalCount FROM `hotel_coupon_status` hcs WHERE hcs.complaint_id = hc.id ) AS totalCount, hc.limit_number as limitNumber,hc.remainder_number as remainderNumber, \n" +
-                "\thc.effective_end_date AS effectiveEndDate \n" +
+                "\thc.grant_start_date AS  effectiveStartDate,(SELECT COUNT( hcs.complaint_id ) AS totalCount FROM `hotel_coupon_status` hcs WHERE hcs.complaint_id = hc.id ) AS totalCount, hc.limit_number as limitNumber,hc.remainder_number as remainderNumber, \n" +
+                "\thc.grant_end_date AS effectiveEndDate \n" +
                 "FROM\n" +
-                "\t`hotel_coupon` hc     where hc.effective_start_date < :dateTime and hc.effective_end_date> :dateTime and hc.`status` = 1  ORDER BY hc.effective_start_date DESC limit :start,:rows";
+                "\t`hotel_coupon` hc     where hc.grant_start_date < :dateTime and hc.grant_end_date> :dateTime and hc.`status` = 1  ORDER BY hc.effective_start_date DESC limit :start,:rows";
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("dateTime", dateTime);
@@ -237,7 +238,7 @@ public class HotelCouponImplDao implements HotelCouponDao {
         String sql="SELECT\n" +
                 "\t count(1)\n" +
                 "FROM\n" +
-                "\t`hotel_coupon` hc where hc.effective_start_date<:date and hc.effective_end_date>:date";
+                "\t`hotel_coupon` hc where hc.grant_start_date<:date and hc.grant_end_date>:date and hc.`status` = 1 ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("date", date);
         return namedParameterJdbcTemplate.queryForInt(sql, sps);
@@ -309,12 +310,25 @@ public class HotelCouponImplDao implements HotelCouponDao {
                 "\thc.deduction_price as deductionPrice,\n" +
                 "\thc.max_deduction as maxDeduction,\n" +
                 "\thc.meet_price as meetPrice,\n" +
-                "\thc.effective_end_date as effectiveEndDate ,\n" +
-                "\tcount(hcs.complaint_id) AS count\n" +
+                "\thc.effective_end_date as effectiveEndDate ,hc.effective_start_date as effectiveStartDate, hc.effective_day as effectiveDay,hc.effective_lose_day as effectiveLoseDay , hc.effective_type as effectiveType, hcs.create_date as dateTime , \n" +
+                "\thcs2.count AS count\n" +
                 "FROM\n" +
                 "\thotel_coupon_status hcs\n" +
-                "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id where FIND_IN_SET(hc.type,:status) and hcs.user_id=:userId and hcs.status=1 \n" +
-                "\tGROUP BY hcs.complaint_id ORDER BY hc.effective_start_date DESC limit :start,:rows";
+                "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id  LEFT JOIN (\n" +
+                "SELECT\n" +
+                "\thc2.id AS id,\n" +
+                "\tcount( hcs.complaint_id ) AS count \n" +
+                "FROM\n" +
+                "\thotel_coupon_status hcs\n" +
+                "\tLEFT JOIN hotel_coupon hc2 ON hc2.id = hcs.complaint_id \n" +
+                "WHERE\n" +
+                "\tFIND_IN_SET( hc2.type, :status ) \n" +
+                "\tAND hcs.user_id = :userId \n" +
+                "\tAND hcs.`status` = 1 \n" +
+                "GROUP BY\n" +
+                "\thcs.complaint_id \n" +
+                "\t) hcs2 ON hcs2.id = hc.id  where FIND_IN_SET(hc.type,:status) and hcs.user_id=:userId and hcs.status=1  \n" +
+                "\tORDER BY hc.effective_start_date DESC limit :start,:rows";
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("status", types);
@@ -356,9 +370,9 @@ public class HotelCouponImplDao implements HotelCouponDao {
     }
 
     @Override
-    public List<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows) {
+    public List<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows, Double totalPrice, String format) {
         int start = (page - 1) * rows;// 每页的起始下标
-        String sql="SELECT\n" +
+        String sql=" SELECT * FROM (SELECT\n" +
                 "\t hcs.id as id , hcs.complaint_id AS complaintId,\n" +
                 "\thc.hotelIds as hotelIds,\n" +
                 "\thc.`name` as name,\n" +
@@ -367,11 +381,14 @@ public class HotelCouponImplDao implements HotelCouponDao {
                 "\thc.deduction_price as deductionPrice,\n" +
                 "\thc.max_deduction as maxDeduction,\n" +
                 "\thc.meet_price as meetPrice,\n" +
-                "\thc.effective_end_date as effectiveEndDate \n" +
+                "\thc.effective_end_date as effectiveEndDate ,hc.effective_start_date as effectiveStartDate, hc.effective_day as effectiveDay,hc.effective_lose_day as effectiveLoseDay , hc.effective_type as effectiveType, hcs.create_date as dateTime ,TIMESTAMPADD(DAY,hc.effective_day,hcs.create_date) as afterDate,\n" +
+                "\tTIMESTAMPADD(DAY,hc.effective_day+hc.effective_lose_day,hcs.create_date) as beforDate\n" +
                 "FROM\n" +
                 "\thotel_coupon_status hcs\n" +
-                "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id where (FIND_IN_SET(:hotelId, hc.hotelIds) or hc.hotelIds=-1 ) and hcs.user_id=:userId and hcs.status=1 \n" +
-                "\t ORDER BY hc.effective_start_date DESC limit :start,:rows";
+                "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id where (FIND_IN_SET(:hotelId, hc.hotelIds) or hc.hotelIds=-1 ) and hcs.user_id=:userId and hcs.status=1 and hc.meet_price<= :totalPrice ) hc2 where ( (hc2.effectiveStartDate < :now AND hc2.effectiveEndDate > :now )\n" +
+                "\tOR (hc2.afterDate < :now  and hc2.beforDate > :now ) \n" +
+                "\t)  \n" +
+                "\t ORDER BY hc2.dateTime DESC   limit :start,:rows";
 
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
@@ -379,6 +396,8 @@ public class HotelCouponImplDao implements HotelCouponDao {
         sps.addValue("userId", userId);
         sps.addValue("start", start);
         sps.addValue("rows", rows);
+        sps.addValue("totalPrice",totalPrice);
+        sps.addValue("now",format);
         List<UsefulCouponVo> list = null;
         try{
             list = namedParameterJdbcTemplate.query(sql, sps,new BeanPropertyRowMapper<>(UsefulCouponVo.class));
@@ -390,21 +409,30 @@ public class HotelCouponImplDao implements HotelCouponDao {
     }
 
     @Override
-    public int usefulCouponTotal(String hotelId, String userId) {
-        String sql="SELECT\n" +
-                "\tCOUNT(*) \n" +
+    public int usefulCouponTotal(String hotelId, String userId,Double totalPrice,String format) {
+        String sql=" SELECT count(*) FROM (SELECT\n" +
+                "\t hcs.id as id , hcs.complaint_id AS complaintId,\n" +
+                "\thc.hotelIds as hotelIds,\n" +
+                "\thc.`name` as name,\n" +
+                "\thc.type as type,\n" +
+                "\thc.rebate_price as rebatePrice,\n" +
+                "\thc.deduction_price as deductionPrice,\n" +
+                "\thc.max_deduction as maxDeduction,\n" +
+                "\thc.meet_price as meetPrice,\n" +
+                "\thc.effective_end_date as effectiveEndDate ,hc.effective_start_date as effectiveStartDate, hc.effective_day as effectiveDay,hc.effective_lose_day as effectiveLoseDay , hc.effective_type as effectiveType, hcs.create_date as dateTime ,TIMESTAMPADD(DAY,hc.effective_day,hcs.create_date) as afterDate,\n" +
+                "\tTIMESTAMPADD(DAY,hc.effective_day+hc.effective_lose_day,hcs.create_date) as beforDate\n" +
                 "FROM\n" +
                 "\thotel_coupon_status hcs\n" +
-                "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id \n" +
-                "WHERE\n" +
-                "\t(FIND_IN_SET(:hotelId, hc.hotelIds) or hc.hotelIds=-1 ) \n" +
-                "\tAND hcs.user_id = :userId \n" +
-                "\tAND hcs.`status` = 1";
+                "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id where (FIND_IN_SET(:hotelId, hc.hotelIds) or hc.hotelIds=-1 ) and hcs.user_id=:userId and hcs.status=1 and hc.meet_price<= :totalPrice ) hc2 where ( (hc2.effectiveStartDate < :now AND hc2.effectiveEndDate > :now )\n" +
+                "\tOR (hc2.afterDate < :now  and hc2.beforDate > :now ) \n" +
+                "\t)  \n" +
+                "\t ORDER BY hc2.dateTime DESC  ";
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("hotelId", hotelId);
         sps.addValue("userId", userId);
-
+        sps.addValue("totalPrice",totalPrice);
+        sps.addValue("now",format);
         return namedParameterJdbcTemplate.queryForInt(sql, sps);
     }
     private void appendValue(HotelCoupon hotelCoupon, StringBuffer stringBuffer, MapSqlParameterSource sps){

+ 1 - 1
mhotel/src/com/happy/dao/impl/HotelImplDao.java

@@ -306,5 +306,5 @@ public class HotelImplDao implements HotelDao {
         stringBuffer.append(" modify_date=:modify_date ");
         sps.addValue("modify_date", UUIDUtil.getNewDate());
     }
-    
+
 }

+ 27 - 1
mhotel/src/com/happy/dao/impl/HouseNumberImplDao.java

@@ -80,7 +80,7 @@ public class HouseNumberImplDao implements HouseNumberDao {
     public List<HouseNumber> queryHouseStatus(Booking book) {
         String sql = "select `id`,`house_id`,`number_name`,`create_id`,`create_date`,`modify_date`,IF(b.number_id is not null, 3, `status`) as `status` from \n" +
                 "(select * from house_number where house_id = :house_id and status != 0) a\n" +
-                "left join (select number_id from house_number_status where DATE_FORMAT(set_date,'%Y-%m-%d') >= :order_start_time and DATE_FORMAT(set_date,'%Y-%m-%d') <= :order_end_time and booking_id != :booking_id and `status` != 1 group by number_id) b on a.id = b.number_id";
+                "inner join (select number_id from house_number_status where DATE_FORMAT(set_date,'%Y-%m-%d') >= :order_start_time and DATE_FORMAT(set_date,'%Y-%m-%d') <= :order_end_time and booking_id != :booking_id and `status` > 1 group by number_id) b on a.id = b.number_id";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("house_id", book.getHouseId());
         sps.addValue("booking_id", book.getId());
@@ -96,6 +96,32 @@ public class HouseNumberImplDao implements HouseNumberDao {
         return null;
     }
 
+    /**
+     * »ñÈ¡Èëס·¿¼ä
+     */
+    @Override
+    public List<HouseNumber> queryCheckRoom(Booking book) {
+        String sql = "select `id`,`house_id`,`number_name`,`create_id`,`create_date`,`modify_date`from\n" +
+                     "(select * from house_number where house_id = :house_id and status != 0) a\n" +
+                     "where not exists\n" +
+                     "(select number_id from house_number_status where DATE_FORMAT(set_date,'%Y-%m-%d') >= :order_start_time and DATE_FORMAT(set_date,'%Y-%m-%d') <= :order_end_time and booking_id != :booking_id and `status` >1 and number_id = a.id group by number_id)" +
+                     "order by number_name asc";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("house_id", book.getHouseId());
+        sps.addValue("booking_id", book.getId());
+        sps.addValue("order_start_time", book.getOrderStartTime().substring(0, 10));
+        sps.addValue("order_end_time", book.getOrderEndTime().substring(0, 10));
+        List<HouseNumber> list = new ArrayList<>();
+        try {
+            list = namedParameterJdbcTemplate.query(sql, sps, new BeanPropertyRowMapper<>(HouseNumber.class));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (list != null && list.size() > 0) return list;
+        return null;
+    }
+
+
     @Override
     public List<HouseNumberDto> queryListOne(HouseNumberDto houseNumberDto) {
         final String SQL_HEAD = "select id, house_id, number_name, create_id, create_date, modify_date, status, house_status from house_number where status in (1, 2) and house_id in (:houseIdList)";

+ 73 - 9
mhotel/src/com/happy/dao/impl/HouseNumberStatusImplDao.java

@@ -1,6 +1,7 @@
 package com.happy.dao.impl;
 
 import com.happy.Model.Booking;
+import com.happy.Model.Holiday;
 import com.happy.Model.HouseNumber;
 import com.happy.Model.HouseNumberStatus;
 import com.happy.Until.BeanMapTool;
@@ -36,6 +37,70 @@ public class HouseNumberStatusImplDao implements HouseNumberStatusDao {
         this.namedParameterJdbcTemplate = namedParameterJdbcTemplate;
     }
 
+    /**
+     * 按年份删除节假日数据
+     *
+     * @param year 年份
+     * @return
+     */
+    @Override
+    public int deleteHolidayByYear(String year) {
+        String sql = "delete from holiday where year = :year";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("year", year);
+        int num = 0;
+        try {
+            num = namedParameterJdbcTemplate.update(sql, sps);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return num;
+    }
+
+    /**
+     * 2023-09-20 a-jax 批量新增节假日数据
+     *
+     * @param list
+     * @return
+     */
+    @Override
+    public int saveHolidayBatch(List<Holiday> list) {
+        SqlParameterSource[] params = SqlParameterSourceUtils.createBatch(list.toArray());
+        String insertSql = "INSERT INTO holiday (id, year, date, is_rest, name)" +
+                " VALUES " +
+                " (:id,:year,:date,:isRest,:name) ";
+        List<MapSqlParameterSource> houseNumberList = new ArrayList<>();
+        for (Holiday h1 : list) {
+            MapSqlParameterSource mapSqlParameterSource = new MapSqlParameterSource();
+            mapSqlParameterSource.addValue("id", h1.getId());
+            mapSqlParameterSource.addValue("year", h1.getYear());
+            mapSqlParameterSource.addValue("date", h1.getDate());
+            mapSqlParameterSource.addValue("isRest", h1.getIsRest());
+            mapSqlParameterSource.addValue("name", h1.getName());
+            houseNumberList.add(mapSqlParameterSource);
+        }
+        int[] m = namedParameterJdbcTemplate.batchUpdate(insertSql, houseNumberList.toArray(new SqlParameterSource[0]));
+        return m.length;
+    }
+
+
+    /**
+     * 根据开始时间和年份查询节假日数据
+     */
+    public List<Holiday> queryHolidays(String year, String startDate, String endDates) {
+        String sql = "select * from holiday where date >=:startDate and date <=:endDate and year =:year order by date";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("startDate", startDate);
+        sps.addValue("endDate", endDates);
+        sps.addValue("year", year);
+        List<Holiday> list = namedParameterJdbcTemplate.query(sql, sps, new BeanPropertyRowMapper<>(Holiday.class));
+
+        if (list != null && list.size() > 0) {
+            return list;
+        }
+        return null;
+    }
+
 
     @Override
     public int saveBatch(List<HouseNumberStatus> list) {
@@ -49,17 +114,16 @@ public class HouseNumberStatusImplDao implements HouseNumberStatusDao {
 
     @Override
     public int updateHouseNumberStatus(String bookId) {
-        StringBuffer stringBuffer =  new StringBuffer("update house_number_status set status = :status, modify_date = :modifyDate");
+        StringBuffer stringBuffer = new StringBuffer("update house_number_status set status = :status, modify_date = :modifyDate");
         MapSqlParameterSource sps = new MapSqlParameterSource();
         stringBuffer.append("  where booking_id=:booking_id  ");
-        sps.addValue("status",0);
-        sps.addValue("booking_id",bookId);
+        sps.addValue("status", 0);
+        sps.addValue("booking_id", bookId);
         sps.addValue("modifyDate", UUIDUtil.getNewDate());
         int num = 0;
-        try{
+        try {
             num = namedParameterJdbcTemplate.update(stringBuffer.toString(), sps);
-        }
-        catch(Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
         return num;
@@ -100,12 +164,12 @@ public class HouseNumberStatusImplDao implements HouseNumberStatusDao {
         SqlUtil.filterKeyword(sqlx);
         String sql = "select id, number_id, booking_id, close_type, remark, date_format(set_date, '%Y-%m-%d') as set_date, create_id, date_format(create_date, '%Y-%m-%d %H:%i:%s') as create_date, date_format(modify_date, '%Y-%m-%d %H:%i:%s') as modify_date, status from house_number_status where 1 = 1 and status != 0" + sqlx;
         List<HouseNumberStatus> list = null;
-        try{
+        try {
             list = namedParameterJdbcTemplate.query(sql, new BeanPropertyRowMapper<>(HouseNumberStatus.class));
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
-        if(list != null && list.size()>0) return list;
+        if (list != null && list.size() > 0) return list;
         return null;
     }
 

+ 23 - 0
mhotel/src/com/happy/dao/impl/UserDaoImpl.java

@@ -5,6 +5,7 @@ import com.happy.Model.weixin.Users;
 import com.happy.Until.Func;
 import com.happy.Until.UUIDUtil;
 import com.happy.dao.UserDao;
+import com.happy.vo.UnevaluatedOrder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
@@ -264,4 +265,26 @@ public class UserDaoImpl implements UserDao {
         return new ArrayList<>();
     }
 
+    @Override
+    public UnevaluatedOrder collect(String hotelId, Integer createId) {
+        String sql = "SELECT\n" +
+                "\t( SELECT h.cover_img FROM hotel h WHERE h.id = :hotelId AND h.`status` = 1 ) as url,\n" +
+                "\t( SELECT hname FROM hotel  WHERE id = :hotelId AND `status` = 1 ) as name,\n" +
+                "\tCOUNT( * ) as count \n" +
+                "FROM\n" +
+                "\t`users` u \n" +
+                "WHERE\n" +
+                "\tu.id = :createId \n" +
+                "\tAND FIND_IN_SET( :hotelId, u.collect_hotel )";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("hotelId", hotelId);
+        sps.addValue("createId", createId);
+        List<UnevaluatedOrder> list = namedParameterJdbcTemplate.query(sql, sps,
+                new BeanPropertyRowMapper<>(UnevaluatedOrder.class));
+        if (list != null && list.size() > 0) {
+            return list.get(0);
+        }
+        return null;
+    }
+
 }

+ 5 - 0
mhotel/src/com/happy/dto/HouseNumberStatusDto.java

@@ -53,4 +53,9 @@ public class HouseNumberStatusDto extends HouseNumberStatus {
      */
     private String orderEndTime;
     //endregion
+
+    /**
+     * 年份
+     */
+    private String year;
 }

+ 1 - 1
mhotel/src/com/happy/service/BookService.java

@@ -44,7 +44,7 @@ public interface BookService {
      * @param rows
      * @return
      */
-    IPage<Booking> queryPage(String sqlx, int page, int rows);
+    IPage<Booking> queryPage(String sqlx, int page, int rows, String orderDesc);
 
     /**
      * 描述:查询列表

+ 5 - 4
mhotel/src/com/happy/service/BookingCommentService.java

@@ -3,13 +3,10 @@ package com.happy.service;
 import com.happy.Model.BookingComment;
 import com.happy.Model.FileInfo;
 import com.happy.dto.IPage;
-import com.happy.vo.CommentDetailsVo;
-import com.happy.vo.CommentVo;
-import com.happy.vo.EvaluatePageVo;
+import com.happy.vo.*;
 import com.happy.Model.HotelCoupon;
 import com.happy.dto.BookCommentDto;
 import com.happy.dto.IPage;
-import com.happy.vo.PersonageDetailsVo;
 
 import java.util.List;
 
@@ -66,4 +63,8 @@ public interface BookingCommentService {
     IPage personageComment(int status, String usersId, int page, int rows);
 
     PersonageDetailsVo personageDetails(String bookingCommentId);
+
+    //待评级数量,已评价数量
+    PersonageCommentCountVo personageCommentCount(String usersId);
+
 }

+ 2 - 1
mhotel/src/com/happy/service/BookingComplaintService.java

@@ -3,6 +3,7 @@ package com.happy.service;
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.HotelCoupon;
 import com.happy.dto.IPage;
+import com.happy.vo.BookingComplaintVo;
 import com.happy.vo.ComplaintPageVo;
 import com.happy.vo.ProgressDetailsVo;
 
@@ -16,7 +17,7 @@ public interface BookingComplaintService {
      * @param rows
      * @return
      */
-    IPage<BookingComplaint> queryPage(String sqlx,String sql, int page, int rows);
+    IPage<BookingComplaintVo> queryPage(String sqlx, String sql, int page, int rows);
 
     /**
      * 描述:获取总条数

+ 1 - 1
mhotel/src/com/happy/service/FileService.java

@@ -66,7 +66,7 @@ public interface FileService {
      * @param linkId
      * @return
      */
-    public List<FileInfo> queryListByLinkId (String linkId);
+    List<FileInfo> queryListByLinkId (String linkId);
     /**
      * 描述:查询一条数据
      * @param sqlx

+ 1 - 1
mhotel/src/com/happy/service/HotelCoupomService.java

@@ -89,7 +89,7 @@ public interface HotelCoupomService {
      * @param rows
      * @return
      */
-    IPage<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows);
+    IPage<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows,Double totalPrice);
 
 
     int useCoupons(HotelCoupon hotelCoupon, HotelCouponStatus hotelCouponStatus);

+ 7 - 0
mhotel/src/com/happy/service/HouseNumberService.java

@@ -39,6 +39,13 @@ public interface HouseNumberService {
     List<HouseNumber> queryHouseStatus(Booking book);
 
     /**
+     * 入住获取房间
+     * @param book
+     * @return
+     */
+    List<HouseNumber> queryCheckRoom(Booking book);
+
+    /**
      * 描述:查询该房型下的房间号
      *
      * @param houseId 房型id

+ 7 - 0
mhotel/src/com/happy/service/HouseNumberStatusService.java

@@ -1,12 +1,19 @@
 package com.happy.service;
 
 import com.alibaba.fastjson.JSONObject;
+import com.happy.Model.Holiday;
 import com.happy.Model.HouseNumberStatus;
 import com.happy.dto.HouseNumberStatusDto;
 
 import java.util.List;
 
 public interface HouseNumberStatusService {
+    int deleteHolidayByYear(String year);
+
+    int saveHolidayBatch(List<Holiday> list);
+
+    List<Holiday> queryHolidays(String year, String startDate, String endDates);
+
     int saveBatch(List<HouseNumberStatus> list);
 
     int updateHouseNumberStatus(String bookId);

+ 9 - 0
mhotel/src/com/happy/service/UserService.java

@@ -4,6 +4,7 @@ import com.happy.Model.Booking;
 import com.happy.Model.weixin.Users;
 import com.happy.Until.Enum.TempEnum;
 import com.happy.dto.IPage;
+import com.happy.vo.UnevaluatedOrder;
 
 import java.util.List;
 
@@ -55,4 +56,12 @@ public interface UserService {
      * @return
      */
     Users delhotelAndUsers(String hotelId, String userId, TempEnum type);
+
+    /**
+     * 通过酒店id,用户id判断酒店是否收藏
+     * @param hotelId1
+     * @param createId1
+     * @return
+     */
+    UnevaluatedOrder collect(String hotelId1, Integer createId1);
 }

+ 2 - 2
mhotel/src/com/happy/service/impl/BookImplService.java

@@ -75,9 +75,9 @@ public class BookImplService implements BookService {
     }
 
     @Override
-    public IPage<Booking> queryPage(String sqlx, int page, int rows) {
+    public IPage<Booking> queryPage(String sqlx, int page, int rows, String orderDesc) {
         IPage<Booking> iPage = new IPage();
-        List<Booking> bookList = bookDao.queryPage(sqlx,page,rows);
+        List<Booking> bookList = bookDao.queryPage(sqlx,page,rows,orderDesc);
         int total = bookDao.queryTotal(sqlx);
         iPage.setPageList(bookList);
         iPage.setPage(page);

+ 55 - 4
mhotel/src/com/happy/service/impl/BookingCommentImplService.java

@@ -197,7 +197,19 @@ public class BookingCommentImplService implements BookingCommentService {
 
     @Override
     public CommentDetailsVo commentDetails(String bookingId) {
-        return bookingCommentDao.commentDetails(bookingId);
+        CommentDetailsVo vo = bookingCommentDao.commentDetails(bookingId);
+        if (vo.getUrl()!=null) {
+            List<String> dateTimeList = vo.getUrl();
+            String s = dateTimeList.get(0);
+            String[] split = s.split(",");
+            ArrayList<String> strings = new ArrayList<>();
+            for (int i = 0; i < split.length; i++) {
+                strings.add(split[i]);
+            }
+            vo.setUrl(strings);
+        }
+
+        return vo;
     }
 
     @Override
@@ -228,7 +240,44 @@ public class BookingCommentImplService implements BookingCommentService {
 
     @Override
     public PersonageDetailsVo personageDetails(String bookingCommentId) {
-        return bookingCommentDao.personageDetails(bookingCommentId);
+        PersonageDetailsVo vo = bookingCommentDao.personageDetails(bookingCommentId);
+        List<String> url = vo.getUrl();
+        List<String> houseUrl = vo.getHouseUrl();
+        if (url != null && url.size() > 0) {
+            String s = url.get(0);
+            String[] split = s.split(",");
+            ArrayList<String> strings = new ArrayList<>();
+            for (int i = 0; i < split.length; i++) {
+                strings.add(split[i]);
+            }
+            vo.setUrl(strings);
+        }
+
+        if (url != houseUrl && houseUrl.size() > 0) {
+            String s = houseUrl.get(0);
+            String[] split = s.split(",");
+            ArrayList<String> strings = new ArrayList<>();
+            for (int i = 0; i < split.length; i++) {
+                strings.add(split[i]);
+            }
+            vo.setHouseUrl(strings);
+        }
+
+
+        return vo;
+    }
+
+
+    @Override
+    public PersonageCommentCountVo personageCommentCount(String usersId) {
+        PersonageCommentCountVo vo = new PersonageCommentCountVo();
+        //带评价数量
+        Integer waiting = bookingCommentDao.personageNotCommentTotal(usersId);
+        vo.setWaitingCount(waiting);
+//        已评价
+        Integer rated = bookingCommentDao.personageCommentTotal(usersId);
+        vo.setRatedCount(rated);
+        return vo;
     }
 
 
@@ -246,8 +295,10 @@ public class BookingCommentImplService implements BookingCommentService {
         for (BookingComment bookingComment : list) {
             List<BookingComment> listByParentId = bookingCommentDao.getByParentId(bookingComment.getId());
             List<BookingComment> bookingCommentList = new ArrayList<>();
-            for (BookingComment parentComment : listByParentId) {
-                bookingCommentList.add(getComment(parentComment));
+            if (listByParentId!=null&&listByParentId.size()>0) {
+                for (BookingComment parentComment : listByParentId) {
+                    bookingCommentList.add(getComment(parentComment));
+                }
             }
             bookingComment.setLowCommentList(bookingCommentList);
         }

+ 11 - 8
mhotel/src/com/happy/service/impl/BookingComplaintImplService.java

@@ -13,10 +13,7 @@ import com.happy.dto.IPage;
 import com.happy.service.BookingComplaintProgressService;
 import com.happy.service.BookingComplaintService;
 import com.happy.service.FileService;
-import com.happy.vo.ComplaintPageVo;
-import com.happy.vo.DetailsVo;
-import com.happy.vo.PersonageCommentVo;
-import com.happy.vo.ProgressDetailsVo;
+import com.happy.vo.*;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -38,9 +35,9 @@ public class BookingComplaintImplService implements BookingComplaintService {
     public BookingComplaintProgressService bookingComplaintProgressService;
 
     @Override
-    public IPage<BookingComplaint> queryPage(String sqlx,String sql, int page, int rows) {
-        IPage<BookingComplaint> iPage = new IPage();
-        List<BookingComplaint> houseList =  bookingComplainDao.queryPage(sqlx,page,rows);
+    public IPage<BookingComplaintVo> queryPage(String sqlx, String sql, int page, int rows) {
+        IPage<BookingComplaintVo> iPage = new IPage();
+        List<BookingComplaintVo> houseList =  bookingComplainDao.queryPage(sqlx,page,rows);
         int total = bookingComplainDao.queryTotal(sql);
         iPage.setPageList(houseList);
         iPage.setPage(page);
@@ -133,6 +130,12 @@ public class BookingComplaintImplService implements BookingComplaintService {
                 String valueBykey1 = vo.getProgressType() == null ? "" : ProgressEnum.getValueBykey(Integer.valueOf(vo.getProgressType()));
                 vo.setProgressType(valueBykey1);
 
+                if (vo.getUrl()!=null) {
+                    String url = vo.getUrl();
+                    String[] split = url.split(",");
+                    vo.setUrl(split[0]);
+                }
+
             }
         }
 
@@ -194,5 +197,5 @@ public class BookingComplaintImplService implements BookingComplaintService {
     }
 
 
-	
+
 }

+ 35 - 3
mhotel/src/com/happy/service/impl/HotelCoupomImplService.java

@@ -12,10 +12,13 @@ import com.happy.service.BookService;
 import com.happy.service.HotelCoupomService;
 import com.happy.service.HotelCoupomStatusService;
 import com.happy.vo.*;
+import org.apache.commons.lang.ObjectUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -210,6 +213,29 @@ public class HotelCoupomImplService implements HotelCoupomService {
     public IPage<CardCouponPageVo> cardCouponPage(String types, String userId, int page, int rows) {
         IPage<CardCouponPageVo> iPage = new IPage();
         List<CardCouponPageVo> hotelCouponList = hotelCouponDao.cardCouponPage(types, userId, page, rows);
+        if (hotelCouponList!=null && hotelCouponList.size()>0) {
+            for (CardCouponPageVo cardCouponPageVo : hotelCouponList) {
+                Integer effectiveType = cardCouponPageVo.getEffectiveType();
+                if (2==effectiveType) {
+                    //生效天数
+                    Integer effectiveDay = cardCouponPageVo.getEffectiveDay();
+                    //失效时间天数
+                    Integer effectiveLoseDay = cardCouponPageVo.getEffectiveLoseDay();
+                    //领券时间
+                    String dateTime = cardCouponPageVo.getDateTime();
+                    DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                    String substring = dateTime.substring(0, 19);
+                    LocalDateTime parse = LocalDateTime.parse(substring, dateTimeFormatter);
+//                    开始时间
+                    LocalDateTime localDateTime = parse.plusDays(effectiveDay);
+                    cardCouponPageVo.setEffectiveStartDate(localDateTime.format(dateTimeFormatter));
+//                    结束时间
+                    LocalDateTime localDateTime1 = localDateTime.plusDays(effectiveLoseDay);
+                    cardCouponPageVo.setEffectiveEndDate(localDateTime1.format(dateTimeFormatter));
+                }
+            }
+        }
+
         int total = hotelCouponDao.cardCouponPageTotal(types, userId);
         iPage.setPageList(hotelCouponList);
         iPage.setPage(page);
@@ -220,10 +246,16 @@ public class HotelCoupomImplService implements HotelCoupomService {
     }
 
     @Override
-    public IPage<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows) {
+    public IPage<UsefulCouponVo> usefulCoupon(String hotelId, String userId, int page, int rows,Double totalPrice) {
         IPage<UsefulCouponVo> iPage = new IPage();
-        List<UsefulCouponVo> hotelCouponList = hotelCouponDao.usefulCoupon(hotelId, userId, page, rows);
-        int total = hotelCouponDao.usefulCouponTotal(hotelId, userId);
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        //判断当前时间是否在有效期内
+        LocalDateTime now = LocalDateTime.now();
+        String format = now.format(dateTimeFormatter);
+        List<UsefulCouponVo> hotelCouponList = hotelCouponDao.usefulCoupon(hotelId, userId, page, rows,totalPrice,format);
+
+        int total = hotelCouponDao.usefulCouponTotal(hotelId, userId,totalPrice,format);
+
         iPage.setPageList(hotelCouponList);
         iPage.setPage(page);
         iPage.setTotalPage((int) Math.ceil((double) total / rows));

+ 7 - 0
mhotel/src/com/happy/service/impl/HouseNumberImplService.java

@@ -39,6 +39,13 @@ public class HouseNumberImplService implements HouseNumberService {
     }
 
     @Override
+    public List<HouseNumber> queryCheckRoom(Booking book) {
+        List<HouseNumber> result = houseNumberDao.queryCheckRoom(book);
+        return result;
+    }
+
+
+    @Override
     public List<HouseNumber> queryByHouseId(String houseId) {
         return houseNumberDao.queryByHouseId(houseId);
     }

+ 41 - 1
mhotel/src/com/happy/service/impl/HouseNumberStatusImplService.java

@@ -1,11 +1,13 @@
 package com.happy.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.happy.Model.Holiday;
 import com.happy.Model.House;
 import com.happy.Model.HouseNumber;
 import com.happy.Model.HouseNumberStatus;
 import com.happy.Until.DateUtil;
 import com.happy.Until.Func;
+import com.happy.Until.TimeExchange;
 import com.happy.dao.HouseNumberDao;
 import com.happy.dao.HouseNumberStatusDao;
 import com.happy.dao.HousePriceDao;
@@ -23,6 +25,8 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.beans.PropertyDescriptor;
+import java.text.ParseException;
+import java.time.LocalDate;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -38,11 +42,31 @@ public class HouseNumberStatusImplService implements HouseNumberStatusService {
     @Resource(name = "housePriceDao")
     public HousePriceDao housePriceDao;
 
+
+    @Override
+    public int deleteHolidayByYear(String year) {
+        return houseNumberStatusDao.deleteHolidayByYear(year);
+    }
+
+    @Override
+    public int saveHolidayBatch(List<Holiday> list) {
+        return houseNumberStatusDao.saveHolidayBatch(list);
+    }
+
+    @Override
+    public List<Holiday> queryHolidays(String year, String startDate, String endDates) {
+
+        List<Holiday> list = houseNumberStatusDao.queryHolidays(year, startDate, endDates);
+        return list;
+    }
+
     @Override
     public int saveBatch(List<HouseNumberStatus> list) {
         return houseNumberStatusDao.saveBatch(list);
     }
 
+
+
     @Override
     public int updateHouseNumberStatus(String bookId) {
         return houseNumberStatusDao.updateHouseNumberStatus(bookId);
@@ -67,7 +91,7 @@ public class HouseNumberStatusImplService implements HouseNumberStatusService {
 
         String setDate = houseNumberStatusDto.getSetDate();
         Date startDate = DateUtil.parseDateOnly(setDate);
-        Date endDate = DateUtil.addDate(startDate, Calendar.DATE, 27);
+        Date endDate = DateUtil.addDate(startDate, Calendar.DATE, 28);
         String setDateWithEndDate = String.format("%s,%s", setDate, DateUtil.parseDateToStr(endDate, DateUtil.Time_Formatter_Day));
 
         //region 房间状态信息
@@ -168,11 +192,27 @@ public class HouseNumberStatusImplService implements HouseNumberStatusService {
                     datas.add(houseJsonObject);
                 }
             }));
+
+            List<Holiday> holidays = houseNumberStatusDao.queryHolidays( String.valueOf(LocalDate.now().getYear()),TimeExchange.DateToString(startDate,"yyyy-MM-dd"),TimeExchange.DateToString(endDate,"yyyy-MM-dd"));
+
             ArrayList<JSONObject> dataTimes = new ArrayList<>();
             dateListBetween.forEach(date -> {
                 JSONObject dataTime = new JSONObject();
                 dataTime.put("dateStr", date);
                 dataTime.put("roomSum", getSum(date, houseNumberList));
+                //2023-09-20 A-jax 添加 星期 节假日 是否休息
+                try {
+                    dataTime.put("weekStr", TimeExchange.getWeek(date));//星期
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+                Optional<Holiday> holiday = holidays.stream().filter(e -> e.getDate().equals(date)).findFirst();
+                String holidayStr = null;
+                if(holiday != null && holiday.isPresent()){
+                    Holiday data = holiday.get();
+                    holidayStr = data.getIsRest().intValue() == 1 ? data.getName() : "班";
+                }
+                dataTime.put("holiday",holidayStr);//节假日
                 dataTimes.add(dataTime);
             });
 

+ 1 - 1
mhotel/src/com/happy/service/impl/HousePriceServiceImpl.java

@@ -124,7 +124,7 @@ public class HousePriceServiceImpl implements HousePriceService {
     @Override
     public List<House> queryHouseListByManagerId(String managerId) {
         if (StringUtils.isBlank(managerId)) return Collections.emptyList();
-        String sqlx = String.format(" and manager_id = %s %s", managerId, " order by create_date desc");
+        String sqlx = String.format(" and manager_id = %s %s", managerId, " order by id desc");
         return houseDao.queryList(sqlx);
     }
 

+ 12 - 1
mhotel/src/com/happy/service/impl/UserServiceImpl.java

@@ -13,6 +13,7 @@ import com.happy.dao.UserDao;
 import com.happy.dto.IPage;
 import com.happy.service.HotelService;
 import com.happy.service.UserService;
+import com.happy.vo.UnevaluatedOrder;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.stereotype.Service;
@@ -141,7 +142,17 @@ public class UserServiceImpl implements UserService {
         return users;
     }
 
-
+    @Override
+    public UnevaluatedOrder collect(String hotelId1, Integer createId1) {
+        UnevaluatedOrder vo=userDao.collect(hotelId1,createId1);
+        Integer count = vo.getCount();
+        if (count<=0) {
+            vo.setIsCollect(false);
+        }else {
+            vo.setIsCollect(true);
+        }
+        return vo;
+    }
 
 
 }

+ 42 - 0
mhotel/src/com/happy/vo/BookingComplaintVo.java

@@ -0,0 +1,42 @@
+package com.happy.vo;
+
+import com.happy.Model.FileInfo;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class BookingComplaintVo {
+
+    private String id; //主键
+
+    private String bookingId;//投诉订单id
+
+    private String hotelId;//投诉民宿id
+
+    private String houseId;//投诉房型id
+
+    private String title;//投诉标题
+
+    private String content;//内容
+
+    private String createId;//创建人
+
+    private String createDate;//创建时间
+
+    private String modifyDate;//修改时间
+
+    private String status;//状态(0删除 1.处理中 2.已处理)
+
+    private String houseName; //房型名称
+
+    private String hotelName; //酒店名称名称
+
+    private String complainPhone; // 投诉人电话
+
+    private String hotelPhone; //酒店电话
+
+    private String order_num;//订单号
+
+    List<FileInfo> fileInfos;// 附件
+}

+ 9 - 0
mhotel/src/com/happy/vo/CardCouponPageVo.java

@@ -25,4 +25,13 @@ public class CardCouponPageVo {
 //    领取张数
     private Integer count;
 
+    private String effectiveStartDate;//有效期开始时间
+
+    private Integer effectiveType;//有效期类型(1.时间段 2.生效失效天数)
+
+    private Integer effectiveDay;//生效时间天数
+    private Integer effectiveLoseDay;//失效时间天数
+
+    private String dateTime;//领券时间
+
 }

+ 13 - 21
mhotel/src/com/happy/vo/CommentDetailsVo.java

@@ -45,33 +45,25 @@ public class CommentDetailsVo {
     //    ���۴���
     private int commentCount;
 
+    //    酒店图片
     private String coverImg;
 
-    //    酒店图片
+//    酒店id
+    private String hotelId;
+
+    public String getHotelId() {
+        return hotelId;
+    }
+
+    public void setHotelId(String hotelId) {
+        this.hotelId = hotelId;
+    }
+
     public String getCoverImg() {
         return coverImg;
     }
 
-    @Override
-    public String toString() {
-        return "CommentDetailsVo{" +
-                "id='" + id + '\'' +
-                ", userName='" + userName + '\'' +
-                ", headPhoto='" + headPhoto + '\'' +
-                ", score=" + score +
-                ", liveTime='" + liveTime + '\'' +
-                ", commentTime='" + commentTime + '\'' +
-                ", houseName='" + houseName + '\'' +
-                ", content='" + content + '\'' +
-                ", url=" + url +
-                ", hotelName='" + hotelName + '\'' +
-                ", hotelScore=" + hotelScore +
-                ", hotelTownship='" + hotelTownship + '\'' +
-                ", hotelType='" + hotelType + '\'' +
-                ", commentCount=" + commentCount +
-                ", coverImg='" + coverImg + '\'' +
-                '}';
-    }
+ 
 
     public void setCoverImg(String coverImg) {
         this.coverImg = coverImg;

+ 12 - 0
mhotel/src/com/happy/vo/PersonageCommentCountVo.java

@@ -0,0 +1,12 @@
+package com.happy.vo;
+
+import lombok.Data;
+
+@Data
+public class PersonageCommentCountVo {
+//    待评价
+    private Integer waitingCount;
+
+//    已评价
+    private Integer ratedCount;
+}

+ 20 - 0
mhotel/src/com/happy/vo/PersonageCommentVo.java

@@ -26,6 +26,26 @@ public class PersonageCommentVo {
 //    图片
     private String url;
 
+//酒店id
+    private String hotelId;
+//    房间id
+    private String houseId;
+
+    public String getHotelId() {
+        return hotelId;
+    }
+
+    public void setHotelId(String hotelId) {
+        this.hotelId = hotelId;
+    }
+
+    public String getHouseId() {
+        return houseId;
+    }
+
+    public void setHouseId(String houseId) {
+        this.houseId = houseId;
+    }
 
     public String getUrl() {
         return url;

+ 41 - 0
mhotel/src/com/happy/vo/PersonageDetailsVo.java

@@ -37,7 +37,48 @@ public class PersonageDetailsVo {
     //    实际支付金额
     private Double payAccount;
 
+//用户姓名
+    private String name;
 
+//    用户头像
+    private String headPhoto;
+
+    private List<String> houseUrl;
+
+    //订单id
+    private String bookingId;
+
+    public String getBookingId() {
+        return bookingId;
+    }
+
+    public void setBookingId(String bookingId) {
+        this.bookingId = bookingId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getHeadPhoto() {
+        return headPhoto;
+    }
+
+    public void setHeadPhoto(String headPhoto) {
+        this.headPhoto = headPhoto;
+    }
+
+    public List<String> getHouseUrl() {
+        return houseUrl;
+    }
+
+    public void setHouseUrl(List<String> houseUrl) {
+        this.houseUrl = houseUrl;
+    }
 
     public String getId() {
         return id;

+ 17 - 0
mhotel/src/com/happy/vo/UnevaluatedOrder.java

@@ -0,0 +1,17 @@
+package com.happy.vo;
+
+import com.happy.dto.IPage;
+import lombok.Data;
+
+@Data
+public class UnevaluatedOrder {
+    private String name;
+
+    private String url;
+
+    private Integer count;
+
+    private Boolean IsCollect;
+
+    private IPage<PersonageCommentVo> page;
+}

+ 13 - 0
mhotel/src/com/happy/vo/UsefulCouponVo.java

@@ -24,4 +24,17 @@ public class UsefulCouponVo {
     private Double meetPrice; // 满减金额
 
     private String effectiveEndDate; //有效期结束时间
+
+    private String effectiveStartDate;//有效期开始时间
+
+    private Integer effectiveType;//有效期类型(1.时间段 2.生效失效天数)
+
+    private Integer effectiveDay;//生效时间天数
+    private Integer effectiveLoseDay;//失效时间天数
+
+    private String dateTime;//领券时间
+
+    private String afterDate;
+    private String beforDate;
+
 }