liu 2 лет назад
Родитель
Сommit
ede4dc9dd8
29 измененных файлов с 603 добавлено и 157 удалено
  1. 1 1
      mhotel/src/com/happy/Model/HotelCouponStatus.java
  2. 46 12
      mhotel/src/com/happy/action/AppBookingCommentAction.java
  3. 75 8
      mhotel/src/com/happy/action/AppBookingComplaintAction.java
  4. 1 0
      mhotel/src/com/happy/action/AppHotelCouponAction.java
  5. 12 0
      mhotel/src/com/happy/dao/BookingComplainDao.java
  6. 3 1
      mhotel/src/com/happy/dao/BookingComplaintProgressDao.java
  7. 1 0
      mhotel/src/com/happy/dao/HotelCouponDao.java
  8. 39 39
      mhotel/src/com/happy/dao/impl/BookingCommentImplDao.java
  9. 115 0
      mhotel/src/com/happy/dao/impl/BookingComplainImplDao.java
  10. 4 3
      mhotel/src/com/happy/dao/impl/BookingComplaintProgressImplDao.java
  11. 1 0
      mhotel/src/com/happy/dao/impl/HotelCoupomStatusImplDao.java
  12. 51 28
      mhotel/src/com/happy/dto/OrderRateDto.java
  13. 11 7
      mhotel/src/com/happy/service/BookingCommentService.java
  14. 2 1
      mhotel/src/com/happy/service/BookingComplaintProgressService.java
  15. 7 0
      mhotel/src/com/happy/service/BookingComplaintService.java
  16. 1 0
      mhotel/src/com/happy/service/HouseNumberService.java
  17. 1 0
      mhotel/src/com/happy/service/impl/AppBookImplService.java
  18. 25 3
      mhotel/src/com/happy/service/impl/BookingCommentImplService.java
  19. 87 1
      mhotel/src/com/happy/service/impl/BookingComplaintImplService.java
  20. 4 2
      mhotel/src/com/happy/service/impl/BookingComplaintProgressImplService.java
  21. 1 1
      mhotel/src/com/happy/service/impl/HotelCoupomImplService.java
  22. 3 0
      mhotel/src/com/happy/service/impl/HotelCoupomStatusImplService.java
  23. 14 12
      mhotel/src/com/happy/vo/BookingCommentPageVo.java
  24. 31 17
      mhotel/src/com/happy/vo/CommentDetailsVo.java
  25. 28 4
      mhotel/src/com/happy/vo/ComplaintPageVo.java
  26. 13 5
      mhotel/src/com/happy/vo/EvaluatePageVo.java
  27. 20 9
      mhotel/src/com/happy/vo/PersonageCommentVo.java
  28. 5 3
      mhotel/src/com/happy/vo/PersonageDetailsVo.java
  29. 1 0
      mhotel/src/struts.xml

+ 1 - 1
mhotel/src/com/happy/Model/HotelCouponStatus.java

@@ -18,7 +18,7 @@ public class HotelCouponStatus {
 
 
 	private String userId; // 用户id
 	private String userId; // 用户id
 
 
-	private Integer createId; // 创建人
+	private String createId; // 创建人
 
 
 	private String createDate; // 创建时间
 	private String createDate; // 创建时间
 
 

+ 46 - 12
mhotel/src/com/happy/action/AppBookingCommentAction.java

@@ -1,8 +1,12 @@
 package com.happy.action;
 package com.happy.action;
 
 
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
 import com.happy.Model.BookingComment;
 import com.happy.Model.BookingComment;
 import com.happy.Until.*;
 import com.happy.Until.*;
+import com.happy.dto.HotelEto;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.dto.OrderRateDto;
 import com.happy.service.BookingCommentService;
 import com.happy.service.BookingCommentService;
 import com.happy.vo.*;
 import com.happy.vo.*;
 import com.opensymphony.xwork2.ActionSupport;
 import com.opensymphony.xwork2.ActionSupport;
@@ -14,6 +18,8 @@ import org.apache.struts2.interceptor.ServletRequestAware;
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
@@ -295,7 +301,9 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
      */
      */
     public JSONObject orderRate() {
     public JSONObject orderRate() {
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();
-        if (score == null || score < 0 || scoreFw == null || scoreFw < 0 || scoreSs == null || scoreSs < 0 || scoreWs == null || scoreWs < 0 || scoreWz == null || scoreWz < 0 || bookingId == null || hotelId == null || houseId == null) {
+
+        JSONObject json = GetHttpParam.getHttpParam(request);
+        if (json == null) {
             jsonObject.put("code", 400);
             jsonObject.put("code", 400);
             jsonObject.put("success", false);
             jsonObject.put("success", false);
             jsonObject.put("message", "缺少数据---orderRate");
             jsonObject.put("message", "缺少数据---orderRate");
@@ -303,15 +311,34 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
             return null;
             return null;
         }
         }
 
 
-        BookingComment bookingComment = BookingComment.builder().bookingId(bookingId)
-                .hotelId(hotelId).houseId(houseId).content(content).commentStatus(commentStatus)
-                .score(score).scoreWs(scoreWs).scoreFw(scoreFw)
-                .scoreSs(scoreSs).scoreWz(scoreWz).createId(createId)
-                .createUsername(createUsername).createDate(createDate)
-                .modifyDate(modifyDate).build();
+        OrderRateDto orderRateDto =  JSONObject.parseObject(json.toString(),  OrderRateDto.class);
 
 
 
 
-        int a = bookingCommentService.orderRate(bookingComment, pictureList);
+
+        if (Func.checkNull(orderRateDto.toString())) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "缺少数据---orderRate");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+        if (orderRateDto.getScore() == null || orderRateDto.getScore() < 0 || orderRateDto.getScoreFw() == null || orderRateDto.getScoreFw() < 0 || orderRateDto.getScoreSs() == null || orderRateDto.getScoreSs() < 0 || orderRateDto.getScoreWs() == null || orderRateDto.getScoreWs() < 0 || orderRateDto.getScoreWz() == null || orderRateDto.getScoreWz() < 0 || orderRateDto.getBookingId() == null || orderRateDto.getHotelId() == null || orderRateDto.getHouseId() == null) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "缺少数据---orderRate");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        BookingComment bookingComment = BookingComment.builder().bookingId(orderRateDto.getBookingId())
+                .hotelId(orderRateDto.getHotelId()).houseId(orderRateDto.getHouseId()).content(orderRateDto.getContent()).commentStatus(orderRateDto.getCommentStatus())
+                .score(orderRateDto.getScore()).scoreWs(orderRateDto.getScoreWs()).scoreFw(orderRateDto.getScoreFw())
+                .scoreSs(orderRateDto.getScoreSs()).scoreWz(orderRateDto.getScoreWz()).createId(orderRateDto.getCreateId())
+                .createUsername(orderRateDto.getCreateUsername()).createDate(orderRateDto.getCreateDate())
+                .modifyDate(orderRateDto.getModifyDate()).build();
+
+
+        int a = bookingCommentService.orderRate(bookingComment,orderRateDto.getPictureList());
 
 
 
 
         if (a > 0) {
         if (a > 0) {
@@ -429,8 +456,12 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
             return null;
             return null;
         }
         }
 //        评论
 //        评论
-        List<CommentVo> CommentVoList= bookingCommentService.commentVoList(bookingCommentId);
-        List<CommentListVo> commentListVos = TreeRecordsUtil.queryCommentTreeRecords(bookingCommentId, CommentVoList);
+        List<CommentVo> commentVoList = bookingCommentService.commentVoList(bookingCommentId);
+        List<CommentListVo> commentListVos=null;
+        if (commentVoList!=null&&commentVoList.size()>0) {
+             commentListVos = TreeRecordsUtil.queryCommentTreeRecords(bookingCommentId, commentVoList);
+        }
+
 //        详情
 //        详情
         CommentDetailsVo commentDetailsVo =bookingCommentService.commentDetails(bookingCommentId);
         CommentDetailsVo commentDetailsVo =bookingCommentService.commentDetails(bookingCommentId);
         if (commentDetailsVo.getCommentTime()!=null) {
         if (commentDetailsVo.getCommentTime()!=null) {
@@ -507,9 +538,12 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
             return null;
             return null;
         }
         }
         //        评论
         //        评论
-        List<CommentVo> CommentVoList= bookingCommentService.commentVoList(bookingCommentId);
-        List<CommentListVo> commentListVos = TreeRecordsUtil.queryCommentTreeRecords(bookingCommentId, CommentVoList);
+        List<CommentVo> commentVoList = bookingCommentService.commentVoList(bookingCommentId);
 
 
+        List<CommentListVo> commentListVos=null;
+        if (commentVoList!=null&&commentVoList.size()>0) {
+            commentListVos = TreeRecordsUtil.queryCommentTreeRecords(bookingCommentId, commentVoList);
+        }
 //        详情
 //        详情
         PersonageDetailsVo personageDetailsVo =bookingCommentService.personageDetails(bookingCommentId);
         PersonageDetailsVo personageDetailsVo =bookingCommentService.personageDetails(bookingCommentId);
         if (personageDetailsVo.getCommentTime()!=null) {
         if (personageDetailsVo.getCommentTime()!=null) {

+ 75 - 8
mhotel/src/com/happy/action/AppBookingComplaintAction.java

@@ -2,9 +2,16 @@ package com.happy.action;
 
 
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.BookingComplaint;
 import com.happy.Until.Func;
 import com.happy.Until.Func;
+import com.happy.Until.GetHttpParam;
 import com.happy.Until.ResUtil;
 import com.happy.Until.ResUtil;
+import com.happy.Until.ResponseUtil;
+import com.happy.dto.IPage;
+import com.happy.dto.OrderComplaintDto;
+import com.happy.dto.OrderRateDto;
 import com.happy.service.BookingComplaintProgressService;
 import com.happy.service.BookingComplaintProgressService;
 import com.happy.service.BookingComplaintService;
 import com.happy.service.BookingComplaintService;
+import com.happy.vo.ComplaintPageVo;
+import com.happy.vo.ProgressDetailsVo;
 import com.opensymphony.xwork2.ActionSupport;
 import com.opensymphony.xwork2.ActionSupport;
 import net.sf.json.JSONObject;
 import net.sf.json.JSONObject;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.ServletActionContext;
@@ -14,6 +21,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 import java.util.List;
+import java.util.UUID;
 
 
 public class AppBookingComplaintAction extends ActionSupport implements ServletRequestAware {
 public class AppBookingComplaintAction extends ActionSupport implements ServletRequestAware {
 
 
@@ -179,7 +187,35 @@ public class AppBookingComplaintAction extends ActionSupport implements ServletR
     public JSONObject orderComplaint() {
     public JSONObject orderComplaint() {
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();
 
 
-            if (Func.checkNull(bookingId) || Func.checkNull(hotelId) || Func.checkNull(houseId) || Func.checkNull(title) || Func.checkNull(content)|| Func.checkNull(createId)|| Func.checkNull(createDate)|| Func.checkNull(modifyDate)) {
+        com.alibaba.fastjson.JSONObject json = GetHttpParam.getHttpParam(request);
+        if (json == null) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "缺少数据---orderRate");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        OrderComplaintDto orderComplaintDto =  com.alibaba.fastjson.JSONObject.parseObject(json.toString(),  OrderComplaintDto.class);
+
+        if (orderComplaintDto==null) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "缺少数据---orderRate");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+        String bookingId = orderComplaintDto.getBookingId();
+        String hotelId = orderComplaintDto.getHotelId();
+        String houseId = orderComplaintDto.getHouseId();
+        String title = orderComplaintDto.getTitle();
+        String content = orderComplaintDto.getContent();
+        String createId = orderComplaintDto.getCreateId();
+        String createDate = orderComplaintDto.getCreateDate();
+        String modifyDate = orderComplaintDto.getModifyDate();
+
+
+        if (Func.checkNull(bookingId) || Func.checkNull(hotelId) || Func.checkNull(houseId) || Func.checkNull(title) || Func.checkNull(content) || Func.checkNull(createId) || Func.checkNull(createDate) || Func.checkNull(modifyDate)) {
             jsonObject.put("code", 400);
             jsonObject.put("code", 400);
             jsonObject.put("success", false);
             jsonObject.put("success", false);
             jsonObject.put("message", "未传入投诉数据---orderComplaint");
             jsonObject.put("message", "未传入投诉数据---orderComplaint");
@@ -187,7 +223,7 @@ public class AppBookingComplaintAction extends ActionSupport implements ServletR
             return null;
             return null;
         }
         }
 
 
-        int insert =bookingComplaintService.insert(bookingId,hotelId,houseId,title,content,createId,createDate,modifyDate,pictureList);
+        int insert = bookingComplaintService.insert(bookingId, hotelId, houseId, title, content, createId, createDate, modifyDate, orderComplaintDto.getPictureList());
 
 
         if (insert > 0) {
         if (insert > 0) {
             jsonObject.put("code", 200);
             jsonObject.put("code", 200);
@@ -204,13 +240,14 @@ public class AppBookingComplaintAction extends ActionSupport implements ServletR
     }
     }
 
 
     /**
     /**
-     * 服务热线
+     * 投诉完成
+     *
      * @return
      * @return
      */
      */
-    public JSONObject serviceHotline(){
+    public JSONObject resolutionComplaint() {
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();
 
 
-        if (Func.checkNull(complaintId)|| Func.checkNull(createId)|| Func.checkNull(createDate)|| Func.checkNull(modifyDate)) {
+        if (Func.checkNull(complaintId) || Func.checkNull(createId) || Func.checkNull(createDate) || Func.checkNull(modifyDate)) {
             jsonObject.put("code", 400);
             jsonObject.put("code", 400);
             jsonObject.put("success", false);
             jsonObject.put("success", false);
             jsonObject.put("message", "未传入complaintId数据---serviceHotline");
             jsonObject.put("message", "未传入complaintId数据---serviceHotline");
@@ -218,7 +255,7 @@ public class AppBookingComplaintAction extends ActionSupport implements ServletR
             return null;
             return null;
         }
         }
 
 
-        int serviceHotlineInsert=bookingComplaintProgressService.serviceHotlineInsert(complaintId,createId,createDate,modifyDate);
+        int serviceHotlineInsert = bookingComplaintProgressService.resolutionComplaint(complaintId, createId, createDate, modifyDate);
 
 
         if (serviceHotlineInsert > 0) {
         if (serviceHotlineInsert > 0) {
             jsonObject.put("code", 200);
             jsonObject.put("code", 200);
@@ -238,9 +275,10 @@ public class AppBookingComplaintAction extends ActionSupport implements ServletR
 
 
     /**
     /**
      * 投诉进度
      * 投诉进度
+     *
      * @return
      * @return
      */
      */
-    public JSONObject complaintPage(){
+    public JSONObject complaintPage() {
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();
 
 
         if (Func.checkNull(usersId)) {
         if (Func.checkNull(usersId)) {
@@ -259,15 +297,44 @@ public class AppBookingComplaintAction extends ActionSupport implements ServletR
             return null;
             return null;
         }
         }
 
 
+        IPage<ComplaintPageVo> iPage = bookingComplaintService.complaintPage(usersId, page, rows);
 
 
-
+        jsonObject.put("code", 200);
+        jsonObject.put("message", "成功");
+        jsonObject.put("success", true);
+        jsonObject.put("page", iPage);
+        ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
 
 
         return null;
         return null;
+
+
     }
     }
 
 
+    /**
+     * 投诉进度详情
+     *
+     * @return
+     */
+    public JSONObject progressDetails() {
+        JSONObject jsonObject = new JSONObject();
+        if (Func.checkNull(complaintId)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入complaintId数据---progressDetails");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
 
 
+        ProgressDetailsVo vo=bookingComplaintService.progressDetails(complaintId);
+        jsonObject.put("code", 200);
+        jsonObject.put("message", "成功");
+        jsonObject.put("success", true);
+        jsonObject.put("page", vo);
+        ResponseUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
 
 
 
 
+        return null;
+    }
 
 
 
 
 }
 }

+ 1 - 0
mhotel/src/com/happy/action/AppHotelCouponAction.java

@@ -333,6 +333,7 @@ public class AppHotelCouponAction extends ActionSupport implements ServletReques
             jsonObject.put("code", 400);
             jsonObject.put("code", 400);
             jsonObject.put("success", false);
             jsonObject.put("success", false);
             jsonObject.put("message", "缺少数据---getCoupon");
             jsonObject.put("message", "缺少数据---getCoupon");
+
             ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
             ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
             return null;
             return null;
         }
         }

+ 12 - 0
mhotel/src/com/happy/dao/BookingComplainDao.java

@@ -3,6 +3,9 @@ package com.happy.dao;
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCoupon;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.vo.ComplaintPageVo;
+import com.happy.vo.DetailsVo;
+import com.happy.vo.ProgressDetailsVo;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -16,6 +19,15 @@ public interface BookingComplainDao {
     BookingComplaint getById(String id);
     BookingComplaint getById(String id);
     String insert(String bookingId, String hotelId, String houseId, String title, String content, String createId, String createDate, String modifyDate);
     String insert(String bookingId, String hotelId, String houseId, String title, String content, String createId, String createDate, String modifyDate);
 
 
+    List<ComplaintPageVo> complaintPage(String usersId, int page, int rows);
+
+    int complaintPageTotal(String usersId);
+
+    ProgressDetailsVo progressDetails(String complaintId);
+
+    List<DetailsVo> detailsVoList(String complaintId);
+
+    DetailsVo detailsVo(String complaintId);
 
 
 
 
 }
 }

+ 3 - 1
mhotel/src/com/happy/dao/BookingComplaintProgressDao.java

@@ -3,5 +3,7 @@ package com.happy.dao;
 public interface BookingComplaintProgressDao {
 public interface BookingComplaintProgressDao {
     int insert(String complaintId, String createId, String createDate, String modifyDate);
     int insert(String complaintId, String createId, String createDate, String modifyDate);
 
 
-    int serviceHotlineInsert(String complaintId, String createId, String createDate, String modifyDate);
+
+
+    int resolutionComplaint(String complaintId, String createId, String createDate, String modifyDate);
 }
 }

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

@@ -3,6 +3,7 @@ package com.happy.dao;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCoupon;
 import com.happy.vo.*;
 import com.happy.vo.*;
 
 
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 public interface HotelCouponDao {
 public interface HotelCouponDao {

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

@@ -351,11 +351,11 @@ 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" +
                 "\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" +
                 "\thd.`name` AS hotelTownship,\n" +
                 "\tb.hotel_type AS hotelType,\n" +
                 "\tb.hotel_type AS hotelType,\n" +
-                "\tifnull( cc.commentSum, 0 ) AS commentCount \n" +
+                "\tifnull( cc.commentSum, 0 ) AS commentCount ,h.cover_img as coverImg\n" +
                 "FROM\n" +
                 "FROM\n" +
                 "\t`booking_comment` bc\n" +
                 "\t`booking_comment` bc\n" +
                 "\tLEFT JOIN users u ON u.id = bc.create_id\n" +
                 "\tLEFT JOIN users u ON u.id = bc.create_id\n" +
-                "\tLEFT JOIN booking b ON b.id = bc.booking_id \n" +
+                "\tLEFT JOIN booking b ON b.id = bc.booking_id  LEFT JOIN hotel h ON h.id=b.hotel_id  \n" +
                 "\tAND b.status_del = 1\n" +
                 "\tAND b.status_del = 1\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 ( 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 hotel_dict hd ON hd.id = b.hotel_township \n" +
                 "\tLEFT JOIN hotel_dict hd ON hd.id = b.hotel_township \n" +
@@ -507,7 +507,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public List<PersonageCommentVo> personageNotCommentPage(String usersId, int page, int rows) {
+        public List<PersonageCommentVo> personageNotCommentPage(String usersId, int page, int rows) {
         int start = (page - 1) * rows;// ÿҳµÄÆðʼÏÂ
         int start = (page - 1) * rows;// ÿҳµÄÆðʼÏÂ
         String sql = "SELECT\n" +
         String sql = "SELECT\n" +
                 "\tb.id AS id,\n" +
                 "\tb.id AS id,\n" +
@@ -518,12 +518,12 @@ public class BookingCommentImplDao implements BookingCommentDao {
                 "\tb.live_time as liveTime,\n" +
                 "\tb.live_time as liveTime,\n" +
                 "\tb.check_out_time as checkOutTime,\n" +
                 "\tb.check_out_time as checkOutTime,\n" +
                 "\tb.pay_account as payAccount\n" +
                 "\tb.pay_account as payAccount\n" +
-                "\t,b.create_userid\n" +
+                "\t,b.create_userid ,fi.url as url\n" +
                 "FROM\n" +
                 "FROM\n" +
                 "\t`booking` b\n" +
                 "\t`booking` b\n" +
                 "\tLEFT JOIN booking_comment bc on b.id=bc.booking_id AND bc.comment_parent_id IS NULL  AND bc.`status`=1\n" +
                 "\tLEFT JOIN booking_comment bc on b.id=bc.booking_id AND bc.comment_parent_id IS NULL  AND bc.`status`=1\n" +
                 "\t\n" +
                 "\t\n" +
-                "\tLEFT JOIN users u on u.id =b.create_userid\n" +
+                "\tLEFT JOIN users u on u.id =b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id\n" +
                 "\t\n" +
                 "\t\n" +
                 "\tWHERE bc.id IS NULL  AND u.id= :usersId   AND b.order_status=5 AND b.status_del=1 ORDER BY b.order_start_time DESC LIMIT :start,:rows";
                 "\tWHERE bc.id IS NULL  AND u.id= :usersId   AND b.order_status=5 AND b.status_del=1 ORDER BY b.order_start_time DESC LIMIT :start,:rows";
 
 
@@ -558,13 +558,13 @@ public class BookingCommentImplDao implements BookingCommentDao {
                 "\tb.house_name AS houseName,\n" +
                 "\tb.house_name AS houseName,\n" +
                 "\tb.live_time AS liveTime,\n" +
                 "\tb.live_time AS liveTime,\n" +
                 "\tb.check_out_time AS checkOutTime,\n" +
                 "\tb.check_out_time AS checkOutTime,\n" +
-                "\tb.pay_account AS payAccount \n" +
+                "\tb.pay_account AS payAccount ,fi.url as url\n" +
                 "FROM\n" +
                 "FROM\n" +
                 "\t`booking` b\n" +
                 "\t`booking` b\n" +
                 "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
                 "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
                 "\tAND bc.comment_parent_id IS NULL \n" +
                 "\tAND bc.comment_parent_id IS NULL \n" +
                 "\tAND bc.`status` = 1\n" +
                 "\tAND bc.`status` = 1\n" +
-                "\tLEFT JOIN users u ON u.id = b.create_userid \n" +
+                "\tLEFT JOIN users u ON u.id = b.create_userid  LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
                 "WHERE\n" +
                 "WHERE\n" +
                 "\tu.id = :usersId \n" +
                 "\tu.id = :usersId \n" +
                 "\tAND b.order_status = 5 \n" +
                 "\tAND b.order_status = 5 \n" +
@@ -593,7 +593,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
                     "\t`booking` b\n" +
                     "\t`booking` b\n" +
                     "\tLEFT JOIN booking_comment bc on b.id=bc.booking_id AND bc.comment_parent_id IS NULL  AND bc.`status`=1\n" +
                     "\tLEFT JOIN booking_comment bc on b.id=bc.booking_id AND bc.comment_parent_id IS NULL  AND bc.`status`=1\n" +
                     "\t\n" +
                     "\t\n" +
-                    "\tLEFT JOIN users u on u.id =b.create_userid\n" +
+                    "\tLEFT JOIN users u on u.id =b.create_userid  LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
                     "\t\n" +
                     "\t\n" +
                     "\tWHERE bc.id IS NULL  AND u.id= :usersId   AND b.order_status=5 AND b.status_del=1 ";
                     "\tWHERE bc.id IS NULL  AND u.id= :usersId   AND b.order_status=5 AND b.status_del=1 ";
             MapSqlParameterSource sps = new MapSqlParameterSource();
             MapSqlParameterSource sps = new MapSqlParameterSource();
@@ -616,7 +616,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
                     "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
                     "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
                     "\tAND bc.comment_parent_id IS NULL \n" +
                     "\tAND bc.comment_parent_id IS NULL \n" +
                     "\tAND bc.`status` = 1\n" +
                     "\tAND bc.`status` = 1\n" +
-                    "\tLEFT JOIN users u ON u.id = b.create_userid \n" +
+                    "\tLEFT JOIN users u ON u.id = b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
                     "WHERE\n" +
                     "WHERE\n" +
                     "\tu.id = :usersId \n" +
                     "\tu.id = :usersId \n" +
                     "\tAND b.order_status = 5 \n" +
                     "\tAND b.order_status = 5 \n" +
@@ -626,38 +626,38 @@ public class BookingCommentImplDao implements BookingCommentDao {
             return namedParameterJdbcTemplate.queryForInt(sql, sps);
             return namedParameterJdbcTemplate.queryForInt(sql, sps);
         }
         }
 
 
-        @Override
-        public PersonageDetailsVo personageDetails (String bookingCommentId){
-            String sql = "SELECT\n" +
-                    "\tbc.id AS id,\n" +
-                    "\tbc.create_date as commentTime, \n" +
-                    "\tbc.score AS score,\n" +
-                    "\tbc.content AS content,\n" +
-                    "\tfi2.url AS url,\n" +
-                    "\tb.hotel_name AS hotelName,\n" +
-                    "\tb.house_order_number AS houseOrderNumber,\n" +
-                    "\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" +
-                    "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" +
-                    "\tWHERE bc.comment_parent_id is NULL AND bc.`status`=1  and bc.id= :bookingCommentId";
+    @Override
+    public PersonageDetailsVo personageDetails (String bookingCommentId){
+        String sql = "SELECT\n" +
+                "\tbc.id AS id,\n" +
+                "\tbc.create_date as commentTime, \n" +
+                "\tbc.score AS score,\n" +
+                "\tbc.content AS content,\n" +
+                "\tfi2.url AS url,\n" +
+                "\tb.hotel_name AS hotelName,\n" +
+                "\tb.house_order_number AS houseOrderNumber,\n" +
+                "\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" +
+                "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" +
+                "\tWHERE bc.comment_parent_id is NULL AND bc.`status`=1  and bc.id= :bookingCommentId";
 
 
-            MapSqlParameterSource sps = new MapSqlParameterSource();
-            sps.addValue("bookingCommentId", bookingCommentId);
-            List<PersonageDetailsVo> list = null;
-            try {
-                list = namedParameterJdbcTemplate.query(sql, sps,
-                        new BeanPropertyRowMapper<>(PersonageDetailsVo.class));
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            if (list != null && list.size() > 0) return list.get(0);
-            return null;
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("bookingCommentId", bookingCommentId);
+        List<PersonageDetailsVo> list = null;
+        try {
+            list = namedParameterJdbcTemplate.query(sql, sps,
+                    new BeanPropertyRowMapper<>(PersonageDetailsVo.class));
+        } catch (Exception e) {
+            e.printStackTrace();
         }
         }
+        if (list != null && list.size() > 0) return list.get(0);
+        return null;
+    }
     public void appendValue(BookingComment bookingComment, StringBuffer stringBuffer, MapSqlParameterSource sps){
     public void appendValue(BookingComment bookingComment, StringBuffer stringBuffer, MapSqlParameterSource sps){
         if (!Func.checkNull(bookingComment.getCommentId())){
         if (!Func.checkNull(bookingComment.getCommentId())){
             stringBuffer.append(" comment_id=:comment_id ,");
             stringBuffer.append(" comment_id=:comment_id ,");

+ 115 - 0
mhotel/src/com/happy/dao/impl/BookingComplainImplDao.java

@@ -8,6 +8,9 @@ import com.happy.Until.SqlUtil;
 import com.happy.Until.UUIDUtil;
 import com.happy.Until.UUIDUtil;
 import com.happy.dao.BookingComplainDao;
 import com.happy.dao.BookingComplainDao;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.vo.ComplaintPageVo;
+import com.happy.vo.DetailsVo;
+import com.happy.vo.ProgressDetailsVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
@@ -118,4 +121,116 @@ public class BookingComplainImplDao implements BookingComplainDao {
         return id;
         return id;
 
 
     }
     }
+
+    @Override
+    public List<ComplaintPageVo> complaintPage(String usersId, int page, int rows) {
+        int start = (page - 1) * rows;// 每页的起始下标
+        String sql ="select * from (SELECT\n" +
+                "\tbc.id as id ,\n" +
+                "\tbc.title as title,\n" +
+                "\tbc.create_date as dateTime,\n" +
+                "\tb.hotel_name as hotelName,\n" +
+                "\tb.order_status as orderStatus,\n" +
+                "\tb.order_start_time as orderStartTime,\n" +
+                "\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" +
+                "\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 ORDER BY bc.create_date DESC limit :start,:rows )bc2 ORDER BY bc2.progressType asc ";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("start", start);
+        sps.addValue("rows", rows);
+        sps.addValue("usersId", usersId);
+        List<ComplaintPageVo> list = namedParameterJdbcTemplate.query(sql, sps,
+                new BeanPropertyRowMapper<>(ComplaintPageVo.class));
+        if (list != null && list.size() > 0) return list;
+        return null;
+    }
+
+    @Override
+    public int complaintPageTotal(String usersId) {
+        String sql ="SELECT\n" +
+                "\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 ";
+
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("usersId", usersId);
+        return namedParameterJdbcTemplate.queryForInt(sql, sps);
+    }
+
+    @Override
+    public ProgressDetailsVo progressDetails(String complaintId) {
+        String sql="SELECT\n" +
+                "\tbc.booking_id as bookingId,\n" +
+                "\tbc.id as complaintId,\n" +
+                "\tbc.title,\n" +
+                "\tbc.content,\n" +
+                "\tbc.create_date as dateTime\n" +
+                "FROM\n" +
+                "\t`booking_complaint` bc\n" +
+                " where bc.id=:complaintId and bc.`status`=1";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("complaintId", complaintId);
+        List<ProgressDetailsVo> list = null;
+        try{
+            list = namedParameterJdbcTemplate.query(sql, sps,
+                    new BeanPropertyRowMapper<>(ProgressDetailsVo.class));
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        if(list != null && list.size()>0) return list.get(0);
+        return null;
+    }
+
+    @Override
+    public List<DetailsVo> detailsVoList(String complaintId) {
+        String sql="SELECT\n" +
+                "\thcp.progress_type as progressType,\n" +
+                "\thcp.create_date as dateTime \n" +
+                "FROM\n" +
+                "\t`booking_complaint_progress` hcp \n" +
+                "WHERE\n" +
+                "\thcp.complaint_id= :complaintId and hcp.status=1 ORDER BY hcp.create_date DESC ";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("complaintId", complaintId);
+        List<DetailsVo> list = null;
+        try{
+            list = namedParameterJdbcTemplate.query(sql, sps,
+                    new BeanPropertyRowMapper<>(DetailsVo.class));
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        if(list != null && list.size()>0) return list;
+        return null;
+    }
+
+    @Override
+    public DetailsVo detailsVo(String complaintId) {
+        String sql="SELECT\n" +
+                "\tbc.title AS title,\n" +
+                "\tbc.content AS content,\n" +
+                "\tfi2.url as urlList,\n" +
+                "\thcp.create_date as dateTime \n" +
+                "FROM\n" +
+                "\t`booking_complaint_progress` hcp \n" +
+                "LEFT JOIN booking_complaint bc on bc.id=hcp.complaint_id and bc.`status`=1\n" +
+                "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.id\n" +
+                "WHERE hcp.complaint_id= :complaintId and hcp.status=1  and hcp.progress_type=1 ORDER BY hcp.create_date DESC";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("complaintId", complaintId);
+        List<DetailsVo> list = null;
+        try{
+            list = namedParameterJdbcTemplate.query(sql, sps,
+                    new BeanPropertyRowMapper<>(DetailsVo.class));
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        if(list != null && list.size()>0) return list.get(0);
+        return null;
+    }
 }
 }

+ 4 - 3
mhotel/src/com/happy/dao/impl/BookingComplaintProgressImplDao.java

@@ -46,7 +46,7 @@ public class BookingComplaintProgressImplDao implements BookingComplaintProgress
     }
     }
 
 
     /**
     /**
-     * ͶËß·þÎñÈÈÏßÌí¼Ó
+     * 投诉完�添加
      * @param complaintId
      * @param complaintId
      * @param createId
      * @param createId
      * @param createDate
      * @param createDate
@@ -54,11 +54,11 @@ public class BookingComplaintProgressImplDao implements BookingComplaintProgress
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public int serviceHotlineInsert(String complaintId, String createId, String createDate, String modifyDate) {
+    public int resolutionComplaint(String complaintId, String createId, String createDate, String modifyDate) {
         String sql = "INSERT INTO booking_complaint_progress (id, complaint_id, progress_type, create_id,create_date,modify_date,status) VALUES (:id, :complaint_id, :progress_type, :create_id,:create_date,:modify_date,:status)";
         String sql = "INSERT INTO booking_complaint_progress (id, complaint_id, progress_type, create_id,create_date,modify_date,status) VALUES (:id, :complaint_id, :progress_type, :create_id,:create_date,:modify_date,:status)";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("complaint_id",complaintId);
         sps.addValue("complaint_id",complaintId);
-        sps.addValue("progress_type",2);
+        sps.addValue("progress_type",3);
         sps.addValue("create_id",createId);
         sps.addValue("create_id",createId);
         sps.addValue("create_date",createDate);
         sps.addValue("create_date",createDate);
         sps.addValue("modify_date",modifyDate);
         sps.addValue("modify_date",modifyDate);
@@ -73,4 +73,5 @@ public class BookingComplaintProgressImplDao implements BookingComplaintProgress
         }
         }
         return num;
         return num;
     }
     }
+
 }
 }

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

@@ -1,5 +1,6 @@
 package com.happy.dao.impl;
 package com.happy.dao.impl;
 
 
+import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCouponStatus;
 import com.happy.Model.HotelCouponStatus;
 import com.happy.Until.UUIDUtil;
 import com.happy.Until.UUIDUtil;
 import com.happy.dao.HotelCoupomStatusDao;
 import com.happy.dao.HotelCoupomStatusDao;

+ 51 - 28
mhotel/src/com/happy/dto/OrderRateDto.java

@@ -2,36 +2,59 @@ package com.happy.dto;
 
 
 import com.happy.Model.BookingComment;
 import com.happy.Model.BookingComment;
 import com.happy.Model.FileInfo;
 import com.happy.Model.FileInfo;
+import lombok.Data;
 
 
 import java.util.List;
 import java.util.List;
 
 
+@Data
 public class OrderRateDto {
 public class OrderRateDto {
-    //         ¸½¼þ
-    private List<FileInfo> fileInfoList;
-//  ÆÀ¼Û
-    private BookingComment bookingComment;
-
-    public List<FileInfo> getFileInfoList() {
-        return fileInfoList;
-    }
-
-    public void setFileInfoList(List<FileInfo> fileInfoList) {
-        this.fileInfoList = fileInfoList;
-    }
-
-    public BookingComment getBookingComment() {
-        return bookingComment;
-    }
-
-    public void setBookingComment(BookingComment bookingComment) {
-        this.bookingComment = bookingComment;
-    }
-
-    @Override
-    public String toString() {
-        return "OrderRateDto{" +
-                "fileInfoList=" + fileInfoList +
-                ", bookingComment=" + bookingComment +
-                '}';
-    }
+    //    评论订�id
+    private String bookingId;
+
+    //    评论民宿id
+    private String hotelId;
+
+    //    评论房型id
+    private String houseId;
+
+    //    内容
+    private String content;
+
+    //    评价状�
+    private String commentStatus;
+
+    //    总评分
+    private Double score;
+
+    //    �生评分
+    private Double scoreWs;
+
+    //    �务评分
+    private Double scoreFw;
+
+    //    设施评分
+    private Double scoreSs;
+
+    //    �置评分
+    private Double scoreWz;
+
+    //    创建人
+    private Integer createId;
+
+    //    评价人
+    private String createUsername;
+
+    //    创建时间
+    private String createDate;
+
+    //    修改时间
+    private String modifyDate;
+
+
+
+    //        图片
+    private List<String> pictureList;
+
+
+
 }
 }

+ 11 - 7
mhotel/src/com/happy/service/BookingCommentService.java

@@ -16,9 +16,9 @@ import java.util.List;
 public interface BookingCommentService {
 public interface BookingCommentService {
 
 
 
 
-    int orderRate( BookingComment bookingComment,List<String> pictureList);
+    int orderRate(BookingComment bookingComment, List<String> pictureList);
 
 
-    IPage evaluatePage(int status,String hotelId, int page, int rows);
+    IPage evaluatePage(int status, String hotelId, int page, int rows);
 
 
     int replyComment(BookingComment bookingComment);
     int replyComment(BookingComment bookingComment);
 
 
@@ -28,6 +28,7 @@ public interface BookingCommentService {
 
 
     /**
     /**
      * 描述:查询订单下的所有评论 根据订单id与comment_parent_id为空查询
      * 描述:查询订单下的所有评论 根据订单id与comment_parent_id为空查询
+     *
      * @param bookId 订单Id
      * @param bookId 订单Id
      * @return 返回订单下所有最大级的评价
      * @return 返回订单下所有最大级的评价
      */
      */
@@ -35,12 +36,14 @@ public interface BookingCommentService {
 
 
     /**
     /**
      * 分页查询
      * 分页查询
+     *
      * @return 返回所有
      * @return 返回所有
      */
      */
-    IPage<BookingComment> queryPage(String sqlx,String sql, int page, int rows);
+    IPage<BookingComment> queryPage(String sqlx, String sql, int page, int rows);
 
 
     /**
     /**
      * 评价列表详情
      * 评价列表详情
+     *
      * @param id 订单id
      * @param id 订单id
      * @return 订单和房型
      * @return 订单和房型
      */
      */
@@ -48,6 +51,7 @@ public interface BookingCommentService {
 
 
     /**
     /**
      * 回复弹窗 保存同时并修改当前回复信息状态为已回复
      * 回复弹窗 保存同时并修改当前回复信息状态为已回复
+     *
      * @param bookingComment 回复内容
      * @param bookingComment 回复内容
      * @return 影响数量
      * @return 影响数量
      */
      */
@@ -56,10 +60,10 @@ public interface BookingCommentService {
     BookingComment queryById(String id);
     BookingComment queryById(String id);
 
 
     int update(BookingComment bookingComment);
     int update(BookingComment bookingComment);
-	
-	 CommentDetailsVo commentDetails(String bookingId);
 
 
-IPage personageComment(int status, String usersId, int page, int rows);
+    CommentDetailsVo commentDetails(String bookingId);
 
 
-PersonageDetailsVo personageDetails(String bookingCommentId);
+    IPage personageComment(int status, String usersId, int page, int rows);
+
+    PersonageDetailsVo personageDetails(String bookingCommentId);
 }
 }

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

@@ -5,5 +5,6 @@ public interface BookingComplaintProgressService {
     int insert(String complaintId, String createId, String createDate, String modifyDate);
     int insert(String complaintId, String createId, String createDate, String modifyDate);
 
 
 
 
-    int serviceHotlineInsert(String complaintId, String createId, String createDate, String modifyDate);
+
+    int resolutionComplaint(String complaintId, String createId, String createDate, String modifyDate);
 }
 }

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

@@ -3,6 +3,8 @@ package com.happy.service;
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.BookingComplaint;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCoupon;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.vo.ComplaintPageVo;
+import com.happy.vo.ProgressDetailsVo;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -33,4 +35,9 @@ public interface BookingComplaintService {
     List<BookingComplaint> toComplainExcel(String sqlx);
     List<BookingComplaint> toComplainExcel(String sqlx);
 
 
     int insert(String bookingId, String hotelId, String houseId, String title, String content, String createId, String createDate, String modifyDate, List<String> pictureList);
     int insert(String bookingId, String hotelId, String houseId, String title, String content, String createId, String createDate, String modifyDate, List<String> pictureList);
+
+    IPage<ComplaintPageVo> complaintPage(String usersId, int page, int rows);
+
+    ProgressDetailsVo progressDetails(String complaintId);
+
 }
 }

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

@@ -4,6 +4,7 @@ import com.happy.Model.Booking;
 import com.happy.Model.HouseNumber;
 import com.happy.Model.HouseNumber;
 import com.happy.dto.HouseNumberDto;
 import com.happy.dto.HouseNumberDto;
 
 
+import java.awt.print.Book;
 import java.util.List;
 import java.util.List;
 
 
 public interface HouseNumberService {
 public interface HouseNumberService {

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

@@ -14,6 +14,7 @@ import com.happy.constant.ResultStatusCode;
 import com.happy.dao.BookDao;
 import com.happy.dao.BookDao;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
 import com.happy.service.*;
 import com.happy.service.*;
+import org.apache.struts2.ServletActionContext;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;

+ 25 - 3
mhotel/src/com/happy/service/impl/BookingCommentImplService.java

@@ -91,6 +91,22 @@ public class BookingCommentImplService implements BookingCommentService {
             vos = bookingCommentDao.evaluatePageComment(hotelId, page, rows);
             vos = bookingCommentDao.evaluatePageComment(hotelId, page, rows);
             total = bookingCommentDao.evaluateTotalComment(hotelId);
             total = bookingCommentDao.evaluateTotalComment(hotelId);
         }
         }
+
+        if (vos!=null&&vos.size()>0) {
+            for (BookingCommentPageVo vo : vos) {
+                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);
+                }
+            }
+        }
+
         iPage.setPage(page);
         iPage.setPage(page);
         iPage.setTotalPage((int) Math.ceil((double) total / rows));
         iPage.setTotalPage((int) Math.ceil((double) total / rows));
         iPage.setRows(rows);
         iPage.setRows(rows);
@@ -103,7 +119,15 @@ public class BookingCommentImplService implements BookingCommentService {
 
 
     @Override
     @Override
     public EvaluatePageVo evaluateScore(String hotelId) {
     public EvaluatePageVo evaluateScore(String hotelId) {
-        return bookingCommentDao.evaluateScore(hotelId);
+        EvaluatePageVo vo=bookingCommentDao.evaluateScore(hotelId);
+        int totalCount = bookingCommentDao.evaluateTotal(hotelId);
+        int pictureTotalCount = bookingCommentDao.evaluateTotalpicture(hotelId);
+        int commentTotalCount = bookingCommentDao.evaluateTotalComment(hotelId);
+        vo.setTotalCount(totalCount);
+        vo.setPictureCount(pictureTotalCount);
+        vo.setCommentCount(commentTotalCount);
+
+        return vo;
     }
     }
 
 
     @Override
     @Override
@@ -246,8 +270,6 @@ public class BookingCommentImplService implements BookingCommentService {
         return parentComment;
         return parentComment;
     }
     }
 
 
-    ;
-
 //    private void getLowcomment(BookingComment comment){
 //    private void getLowcomment(BookingComment comment){
 //        List<BookingComment> list = new ArrayList<>();
 //        List<BookingComment> list = new ArrayList<>();
 //        if (comment.getLowCommentList()!=null) {
 //        if (comment.getLowCommentList()!=null) {

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

@@ -4,6 +4,8 @@ import com.happy.Model.BookingComplaint;
 import com.happy.Model.FileInfo;
 import com.happy.Model.FileInfo;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.House;
 import com.happy.Model.House;
+import com.happy.Until.Enum.PayEnum;
+import com.happy.Until.Enum.ProgressEnum;
 import com.happy.dao.BookingComplainDao;
 import com.happy.dao.BookingComplainDao;
 import com.happy.dao.BookingLogDao;
 import com.happy.dao.BookingLogDao;
 import com.happy.dao.FileInfoDao;
 import com.happy.dao.FileInfoDao;
@@ -11,6 +13,10 @@ import com.happy.dto.IPage;
 import com.happy.service.BookingComplaintProgressService;
 import com.happy.service.BookingComplaintProgressService;
 import com.happy.service.BookingComplaintService;
 import com.happy.service.BookingComplaintService;
 import com.happy.service.FileService;
 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 org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
@@ -99,7 +105,7 @@ public class BookingComplaintImplService implements BookingComplaintService {
 
 
         int cpInsert=bookingComplaintProgressService.insert(complaintId,createId,createDate,modifyDate);
         int cpInsert=bookingComplaintProgressService.insert(complaintId,createId,createDate,modifyDate);
 
 
-        if (Long.valueOf(complaintId) > 0 && i > 0 && cpInsert>0) {
+        if (complaintId != null && i > 0 && cpInsert > 0) {
             return i;
             return i;
         } else {
         } else {
             return 0;
             return 0;
@@ -108,5 +114,85 @@ public class BookingComplaintImplService implements BookingComplaintService {
     }
     }
 
 
 
 
+    /**
+     * 投诉进度
+     *
+     * @param usersId
+     * @param page
+     * @param rows
+     * @return
+     */
+    @Override
+    public IPage<ComplaintPageVo> complaintPage(String usersId, int page, int rows) {
+        IPage<ComplaintPageVo> iPage = new IPage();
+        List<ComplaintPageVo> vos = bookingComplainDao.complaintPage(usersId, page, rows);
+        if (vos != null && vos.size() > 0) {
+            for (ComplaintPageVo vo : vos) {
+                String valueBykey = PayEnum.getValueBykey(Integer.valueOf(vo.getOrderStatus()));
+                vo.setOrderStatus(valueBykey);
+                String valueBykey1 = ProgressEnum.getValueBykey(Integer.valueOf(vo.getProgressType()));
+                vo.setProgressType(valueBykey1);
+
+            }
+        }
+
+        int total = bookingComplainDao.complaintPageTotal(usersId);
+
+        iPage.setPage(page);
+        iPage.setTotalPage((int) Math.ceil((double) total / rows));
+        iPage.setRows(rows);
+        iPage.setTotal(total);
+        iPage.setPageList(vos);
+        return iPage;
+
+
+    }
+
+
+    /**
+     * 投诉详情
+     *
+     * @param complaintId
+     * @return
+     */
+    @Override
+    public ProgressDetailsVo progressDetails(String complaintId) {
+        ProgressDetailsVo vo = bookingComplainDao.progressDetails(complaintId);
+
+        List<DetailsVo> detailsVoList = bookingComplainDao.detailsVoList(complaintId);
+        if (detailsVoList!=null&&detailsVoList.size()>0) {
+            for (DetailsVo vo1 : detailsVoList) {
+                if (vo1.getProgressType() != null) {
+                    String progressType = vo1.getProgressType();
+                    String valueBykey = ProgressEnum.getValueBykey(Integer.valueOf(progressType));
+                    vo1.setProgressType(valueBykey);
+                }
+            }
+        }
+
+//        获取提交成功的
+        DetailsVo detailsVo = bookingComplainDao.detailsVo(complaintId);
+
+        if (detailsVo.getUrlList() != null) {
+            List<String> dateTimeList = detailsVo.getUrlList();
+            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]);
+            }
+            detailsVo.setUrlList(strings);
+        }
+        detailsVo.setProgressType("提交成功");
+
+        detailsVoList.add(detailsVo);
+
+
+        vo.setDetailsVoList(detailsVoList);
+
+        return vo;
+    }
+
+
 	
 	
 }
 }

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

@@ -18,8 +18,10 @@ public class BookingComplaintProgressImplService implements BookingComplaintProg
         return bookingComplaintProgressDao.insert(complaintId,createId,createDate,modifyDate);
         return bookingComplaintProgressDao.insert(complaintId,createId,createDate,modifyDate);
     }
     }
 
 
+
+
     @Override
     @Override
-    public int serviceHotlineInsert(String complaintId, String createId, String createDate, String modifyDate) {
-        return bookingComplaintProgressDao.serviceHotlineInsert(complaintId,createId,createDate,modifyDate);
+    public int resolutionComplaint(String complaintId, String createId, String createDate, String modifyDate) {
+        return bookingComplaintProgressDao.resolutionComplaint(complaintId,createId,createDate,modifyDate);
     }
     }
 }
 }

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

@@ -16,7 +16,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
-import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 @Service("hotelCoupomService")
 @Service("hotelCoupomService")

+ 3 - 0
mhotel/src/com/happy/service/impl/HotelCoupomStatusImplService.java

@@ -1,13 +1,16 @@
 package com.happy.service.impl;
 package com.happy.service.impl;
 
 
 import com.happy.Model.HotelCouponStatus;
 import com.happy.Model.HotelCouponStatus;
+import com.happy.Until.UUIDUtil;
 import com.happy.dao.AdminDao;
 import com.happy.dao.AdminDao;
 import com.happy.dao.HotelCoupomStatusDao;
 import com.happy.dao.HotelCoupomStatusDao;
 import com.happy.service.HotelCoupomStatusService;
 import com.happy.service.HotelCoupomStatusService;
+import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.util.List;
 import java.util.List;
+import java.util.UUID;
 
 
 @Service("hotelCoupomStatusService")
 @Service("hotelCoupomStatusService")
 public class HotelCoupomStatusImplService implements HotelCoupomStatusService {
 public class HotelCoupomStatusImplService implements HotelCoupomStatusService {

+ 14 - 12
mhotel/src/com/happy/vo/BookingCommentPageVo.java

@@ -1,25 +1,27 @@
 package com.happy.vo;
 package com.happy.vo;
 
 
+import java.util.List;
+
 public class BookingCommentPageVo {
 public class BookingCommentPageVo {
 
 
     private String id;
     private String id;
-//    评分
+//    锟斤拷锟斤拷
     private Double score;
     private Double score;
-//  用户名
+//  锟矫伙拷锟斤拷
     private String userName;
     private String userName;
-//    头
+//    头锟斤拷
     private String headPhoto;
     private String headPhoto;
-//   入住时间
+//   锟斤拷住时锟斤拷
     private String liveTime;
     private String liveTime;
-//    评论时间
+//    锟斤拷锟斤拷时锟斤拷
     private String commentTime;
     private String commentTime;
-//  房型
+//  锟斤拷锟斤拷
     private String houseName;
     private String houseName;
-//    内容
+//    锟斤拷锟斤拷
     private String content;
     private String content;
-//    
-    private String url;
-//    评论次数
+//    锟斤拷
+    private List<String> url;
+//    锟斤拷锟桔达拷锟斤拷
     private int commentCount;
     private int commentCount;
 
 
 
 
@@ -87,11 +89,11 @@ public class BookingCommentPageVo {
         this.content = content;
         this.content = content;
     }
     }
 
 
-    public String getUrl() {
+    public List<String> getUrl() {
         return url;
         return url;
     }
     }
 
 
-    public void setUrl(String url) {
+    public void setUrl(List<String> url) {
         this.url = url;
         this.url = url;
     }
     }
 
 

+ 31 - 17
mhotel/src/com/happy/vo/CommentDetailsVo.java

@@ -1,48 +1,57 @@
 package com.happy.vo;
 package com.happy.vo;
 
 
+import java.util.List;
+
 public class CommentDetailsVo {
 public class CommentDetailsVo {
     //    id
     //    id
     private String id;
     private String id;
 
 
-    //    评论人
+    //    锟斤拷锟斤拷锟斤拷
     private String userName;
     private String userName;
 
 
-    //    评论头像
+    //    锟斤拷锟斤拷头锟斤拷
     private String headPhoto;
     private String headPhoto;
 
 
-    //    评论评分
+    //    锟斤拷锟斤拷锟斤拷锟斤拷
     private Double score;
     private Double score;
 
 
-    //   入住时间
+    //   锟斤拷住时锟斤拷
     private String liveTime;
     private String liveTime;
 
 
-    //    评论时间
+    //    锟斤拷锟斤拷时锟斤拷
     private String commentTime;
     private String commentTime;
 
 
-    //  房型
+    //  锟斤拷锟斤拷
     private String houseName;
     private String houseName;
 
 
-    //    内容
+    //    锟斤拷锟斤拷
     private String content;
     private String content;
 
 
-    //    
-    private String url;
+    //    锟斤拷
+    private List<String> url;
 
 
-    //    名宿名称
+    //    锟斤拷锟斤拷锟斤拷锟斤拷
     private String hotelName;
     private String hotelName;
 
 
-    //    名宿评分
+    //    锟斤拷锟斤拷锟斤拷锟斤拷
     private Double hotelScore;
     private Double hotelScore;
 
 
-    //    所属城镇
+    //    锟斤拷锟斤拷锟斤拷锟斤拷
     private String hotelTownship;
     private String hotelTownship;
 
 
-    //    酒店类型
+    //    锟狡碉拷锟斤拷锟斤拷
     private String hotelType;
     private String hotelType;
 
 
-    //    评论次数
+    //    锟斤拷锟桔达拷锟斤拷
     private int commentCount;
     private int commentCount;
 
 
+    private String coverImg;
+
+    //    閰掑簵鍥剧墖
+    public String getCoverImg() {
+        return coverImg;
+    }
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         return "CommentDetailsVo{" +
         return "CommentDetailsVo{" +
@@ -54,15 +63,20 @@ public class CommentDetailsVo {
                 ", commentTime='" + commentTime + '\'' +
                 ", commentTime='" + commentTime + '\'' +
                 ", houseName='" + houseName + '\'' +
                 ", houseName='" + houseName + '\'' +
                 ", content='" + content + '\'' +
                 ", content='" + content + '\'' +
-                ", url='" + url + '\'' +
+                ", url=" + url +
                 ", hotelName='" + hotelName + '\'' +
                 ", hotelName='" + hotelName + '\'' +
                 ", hotelScore=" + hotelScore +
                 ", hotelScore=" + hotelScore +
                 ", hotelTownship='" + hotelTownship + '\'' +
                 ", hotelTownship='" + hotelTownship + '\'' +
                 ", hotelType='" + hotelType + '\'' +
                 ", hotelType='" + hotelType + '\'' +
                 ", commentCount=" + commentCount +
                 ", commentCount=" + commentCount +
+                ", coverImg='" + coverImg + '\'' +
                 '}';
                 '}';
     }
     }
 
 
+    public void setCoverImg(String coverImg) {
+        this.coverImg = coverImg;
+    }
+
     public String getId() {
     public String getId() {
         return id;
         return id;
     }
     }
@@ -127,11 +141,11 @@ public class CommentDetailsVo {
         this.content = content;
         this.content = content;
     }
     }
 
 
-    public String getUrl() {
+    public List<String> getUrl() {
         return url;
         return url;
     }
     }
 
 
-    public void setUrl(String url) {
+    public void setUrl(List<String> url) {
         this.url = url;
         this.url = url;
     }
     }
 
 

+ 28 - 4
mhotel/src/com/happy/vo/ComplaintPageVo.java

@@ -1,5 +1,14 @@
 package com.happy.vo;
 package com.happy.vo;
 
 
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
 public class ComplaintPageVo {
 public class ComplaintPageVo {
 
 
     private String id;
     private String id;
@@ -8,11 +17,26 @@ public class ComplaintPageVo {
 
 
     private String dateTime;
     private String dateTime;
 
 
+    //
     private String hotelName;
     private String hotelName;
 
 
-//    private String
-
-
-
+    //    订单状态
+    private String orderStatus;
+
+    //    订单开始时间
+    private String orderStartTime;
+    //    订单结束时间
+    private String orderEndTime;
+    //  实际支付金额
+    private BigDecimal payAccount;
+    //订单房间数
+    private Integer houseOrderNumber;
+    //    房间名称
+    private String houseName;
+
+    //  投诉进度
+    private String progressType;
+    //    名宿图片
+    private String url;
 
 
 }
 }

+ 13 - 5
mhotel/src/com/happy/vo/EvaluatePageVo.java

@@ -1,19 +1,27 @@
 package com.happy.vo;
 package com.happy.vo;
 
 
+import com.happy.dto.IPage;
+import lombok.Data;
 
 
+@Data
 public class EvaluatePageVo {
 public class EvaluatePageVo {
 
 
-//    总评分
+//    鎬诲垎
     private Double score;
     private Double score;
-//    位置评分
+//    脦禄脰脙脝脌路脰
     private Double scoreWz;
     private Double scoreWz;
-//    卫生评分
+//    脦脌脡煤脝脌路脰
     private Double scoreWs;
     private Double scoreWs;
-//    设施评分
+//    脡猫脢漏脝脌路脰
     private Double scoreSs;
     private Double scoreSs;
-//    服务评分
+//    路镁脦帽脝脌路脰
     private Double scoreFw;
     private Double scoreFw;
 
 
+    private Integer totalCount;
+    private Integer pictureCount;
+    private Integer commentCount;
+
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         return "EvaluatePageVo{" +
         return "EvaluatePageVo{" +

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

@@ -1,30 +1,41 @@
 package com.happy.vo;
 package com.happy.vo;
 
 
 public class PersonageCommentVo {
 public class PersonageCommentVo {
-//    订单id
+//    露漏碌楼id
     private String id;
     private String id;
-//    评论id
+//    脝脌脗脹id
     private String bookingCommentId;
     private String bookingCommentId;
-//    名宿名称
+//    脙没脣脼脙没鲁脝
     private String hotelName;
     private String hotelName;
 
 
-//     订房数量
+//     露漏路驴脢媒脕驴
     private Integer houseOrderNumber;
     private Integer houseOrderNumber;
 
 
-//    房型名称
+//    路驴脨脥脙没鲁脝
     private String houseName;
     private String houseName;
 
 
-//    入住时间
+//    脠毛脳隆脢卤录盲
     private String liveTime;
     private String liveTime;
 
 
-//    离店时间
+//    脌毛碌锚脢卤录盲
     private String checkOutTime;
     private String checkOutTime;
 
 
-//    实际支付金额
+//    脢碌录脢脰搂赂露陆冒露卯
     private Double payAccount;
     private Double payAccount;
 
 
-//  房型图片
+//    鍥剧墖
+    private String url;
 
 
+//  锟斤拷锟斤拷图片
+
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
 
 
     public String getId() {
     public String getId() {
         return id;
         return id;

+ 5 - 3
mhotel/src/com/happy/vo/PersonageDetailsVo.java

@@ -1,5 +1,7 @@
 package com.happy.vo;
 package com.happy.vo;
 
 
+import java.util.List;
+
 public class PersonageDetailsVo {
 public class PersonageDetailsVo {
 
 
     //    id
     //    id
@@ -15,7 +17,7 @@ public class PersonageDetailsVo {
     private String content;
     private String content;
 
 
     //    ÕÕÆ¬
     //    ÕÕÆ¬
-    private String url;
+    List<String> url;
 
 
     //    ÃûËÞÃû³Æ
     //    ÃûËÞÃû³Æ
     private String hotelName;
     private String hotelName;
@@ -69,11 +71,11 @@ public class PersonageDetailsVo {
         this.content = content;
         this.content = content;
     }
     }
 
 
-    public String getUrl() {
+    public List<String> getUrl() {
         return url;
         return url;
     }
     }
 
 
-    public void setUrl(String url) {
+    public void setUrl(List<String> url) {
         this.url = url;
         this.url = url;
     }
     }
 
 

+ 1 - 0
mhotel/src/struts.xml

@@ -61,6 +61,7 @@
 		<action name="abca*" method = "{1}" class="com.happy.action.AppBookingCommentAction"></action>
 		<action name="abca*" method = "{1}" class="com.happy.action.AppBookingCommentAction"></action>
 
 
 		<action name="complaint*" method = "{1}" class="com.happy.action.AppBookingComplaintAction"></action>
 		<action name="complaint*" method = "{1}" class="com.happy.action.AppBookingComplaintAction"></action>
+		<action name="hc*" method = "{1}" class="com.happy.action.AppHotelCouponAction"></action>
 
 
 	</package>
 	</package>
 	<package name="interfaces" namespace="/interfaces" extends="struts-default">
 	<package name="interfaces" namespace="/interfaces" extends="struts-default">