Browse Source

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

lijie 2 years ago
parent
commit
5fad19ac19
26 changed files with 1722 additions and 123 deletions
  1. 45 0
      mhotel/src/com/happy/Until/TreeRecordsUtil.java
  2. 142 7
      mhotel/src/com/happy/action/AppBookingCommentAction.java
  3. 273 0
      mhotel/src/com/happy/action/AppBookingComplaintAction.java
  4. 43 0
      mhotel/src/com/happy/common/util/SensitiveWordFilter.java
  5. 15 2
      mhotel/src/com/happy/dao/BookingCommentDao.java
  6. 4 0
      mhotel/src/com/happy/dao/BookingComplainDao.java
  7. 7 0
      mhotel/src/com/happy/dao/BookingComplaintProgressDao.java
  8. 1 0
      mhotel/src/com/happy/dao/HouseNumberDao.java
  9. 309 77
      mhotel/src/com/happy/dao/impl/BookingCommentDaoImpl.java
  10. 33 0
      mhotel/src/com/happy/dao/impl/BookingComplainImplDao.java
  11. 76 0
      mhotel/src/com/happy/dao/impl/BookingComplaintProgressImplDao.java
  12. 5 0
      mhotel/src/com/happy/dao/impl/HouseNumberImplDao.java
  13. 5 0
      mhotel/src/com/happy/dao/impl/HouseNumberStatusImplDao.java
  14. 10 0
      mhotel/src/com/happy/service/BookingCommentService.java
  15. 9 0
      mhotel/src/com/happy/service/BookingComplaintProgressService.java
  16. 2 0
      mhotel/src/com/happy/service/BookingComplaintService.java
  17. 80 37
      mhotel/src/com/happy/service/impl/BookingCommentImplService.java
  18. 57 0
      mhotel/src/com/happy/service/impl/BookingComplaintImplService.java
  19. 25 0
      mhotel/src/com/happy/service/impl/BookingComplaintProgressImplService.java
  20. 177 0
      mhotel/src/com/happy/vo/CommentDetailsVo.java
  21. 91 0
      mhotel/src/com/happy/vo/CommentListVo.java
  22. 74 0
      mhotel/src/com/happy/vo/CommentVo.java
  23. 18 0
      mhotel/src/com/happy/vo/ComplaintPageVo.java
  24. 92 0
      mhotel/src/com/happy/vo/PersonageCommentVo.java
  25. 127 0
      mhotel/src/com/happy/vo/PersonageDetailsVo.java
  26. 2 0
      mhotel/src/struts.xml

+ 45 - 0
mhotel/src/com/happy/Until/TreeRecordsUtil.java

@@ -0,0 +1,45 @@
+package com.happy.Until;
+
+import com.happy.vo.CommentListVo;
+import com.happy.vo.CommentVo;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class TreeRecordsUtil {
+    /**
+     * 根据父类ID获取树形菜单数据
+     * @param parentID 父级ID
+     * @param lists 数据集合
+     * @return
+     */
+    public static List<CommentListVo> queryCommentTreeRecords(String parentID, List<CommentVo> lists) {
+        List<CommentListVo> newTrees = new ArrayList<>();
+
+        List<CommentVo> datas = lists.stream().filter(e -> e.getCommentId().equals(parentID)).collect(Collectors.toList());
+
+        for (CommentVo data : datas) {
+            CommentListVo item = CommentListVo.builder()
+                    .id(data.getId())
+                    .commentId(data.getCommentId())
+                    .commentName(data.getCommentName())
+                    .userName(data.getUserName())
+                    .headPhoto(data.getHeadPhoto())
+            // 将时间转化为 yyyy/MM/dd
+                    .dateTime( DateUtil.parseDateToStr((Func.parseDate(data.getDateTime())), DateUtil.Time_Formatter_Day))
+                    .content(data.getContent())
+                    .build();
+            List<CommentListVo> news = queryCommentTreeRecords(item.getId(), lists);
+            if (news == null || news.size() == 0) {
+                newTrees.add(item);
+                continue;
+            } else {
+                item.setCommentVoList(news);
+                newTrees.add(item);
+            }
+        }
+
+        return newTrees;
+    }
+}

+ 142 - 7
mhotel/src/com/happy/action/AppBookingCommentAction.java

@@ -1,25 +1,22 @@
 package com.happy.action;
 package com.happy.action;
 
 
 import com.happy.Model.BookingComment;
 import com.happy.Model.BookingComment;
-import com.happy.Until.Func;
-import com.happy.Until.ResUtil;
-import com.happy.Until.ResponseUtil;
+import com.happy.Until.*;
 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.BookingCommentPageVo;
-import com.happy.vo.EvaluatePageVo;
+import com.happy.vo.*;
 import com.opensymphony.xwork2.ActionSupport;
 import com.opensymphony.xwork2.ActionSupport;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.interceptor.ServletRequestAware;
 import org.apache.struts2.interceptor.ServletRequestAware;
-import org.springframework.web.bind.annotation.RequestBody;
 
 
 
 
 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.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.stream.Collectors;
 
 
 
 
 /**
 /**
@@ -272,6 +269,27 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
         this.status = status;
         this.status = status;
     }
     }
 
 
+
+    public String bookingCommentId;
+
+    public String getBookingCommentId() {
+        return bookingCommentId;
+    }
+
+    public void setBookingCommentId(String bookingCommentId) {
+        this.bookingCommentId = bookingCommentId;
+    }
+
+    public String usersId;
+
+    public String getUsersId() {
+        return usersId;
+    }
+
+    public void setUsersId(String usersId) {
+        this.usersId = usersId;
+    }
+
     /**
     /**
      * 添加评论
      * 添加评论
      */
      */
@@ -395,7 +413,124 @@ public class AppBookingCommentAction extends ActionSupport implements ServletReq
         jsonObject.put("success", false);
         jsonObject.put("success", false);
         ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
         ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
         return null;
         return null;
+    }
+
+    /**
+     * 评论详情
+     * @return
+     */
+    public JSONObject commentDetails() {
+        JSONObject jsonObject = new JSONObject();
+        if (Func.checkNull(bookingCommentId)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入bookingCommentId数据---commentDetails");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+//        评论
+        List<CommentVo> CommentVoList= bookingCommentService.commentVoList(bookingCommentId);
+        List<CommentListVo> commentListVos = TreeRecordsUtil.queryCommentTreeRecords(bookingCommentId, CommentVoList);
+//        详情
+        CommentDetailsVo commentDetailsVo =bookingCommentService.commentDetails(bookingCommentId);
+        if (commentDetailsVo.getCommentTime()!=null) {
+            commentDetailsVo.setCommentTime(DateUtil.parseDateToStr((Func.parseDate(commentDetailsVo.getCommentTime())), DateUtil.Time_Formatter_Day));
+        }
+
+        if (commentDetailsVo.getLiveTime()!=null) {
+            commentDetailsVo.setLiveTime(DateUtil.parseDateToStr((Func.parseDate(commentDetailsVo.getLiveTime())), DateUtil.Time_Formatter_Day));
+        }
+
+        jsonObject.put("code", 200);
+        jsonObject.put("message", "成功");
+        jsonObject.put("success", true);
+        jsonObject.put("comment",commentListVos);
+        jsonObject.put("commentDetails",commentDetailsVo);
+        ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+        return null;
+    }
+
 
 
+    /**
+     * 个人评论分页数据
+     * @return
+     */
+    public JSONObject personageComment(){
+        JSONObject jsonObject = new JSONObject();
+        if (Func.checkNull(usersId)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入usersIdId数据---personageComment");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+        if (Func.checkNull(status + "")) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入status数据---personageComment");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        if (page <= 0 || rows <= 0) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入page,rows数据---personageComment");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+
+        IPage ipage=bookingCommentService.personageComment(status, 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
+     */
+    public JSONObject personageDetails(){
+        JSONObject jsonObject = new JSONObject();
+        if (Func.checkNull(bookingCommentId)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入bookingCommentId数据---commentDetails");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+        //        评论
+        List<CommentVo> CommentVoList= bookingCommentService.commentVoList(bookingCommentId);
+        List<CommentListVo> commentListVos = TreeRecordsUtil.queryCommentTreeRecords(bookingCommentId, CommentVoList);
+
+//        详情
+        PersonageDetailsVo personageDetailsVo =bookingCommentService.personageDetails(bookingCommentId);
+        if (personageDetailsVo.getCommentTime()!=null) {
+            personageDetailsVo.setCommentTime(DateUtil.parseDateToStr((Func.parseDate(personageDetailsVo.getCommentTime())), DateUtil.Time_Formatter_Day));
+        }
+
+        if (personageDetailsVo.getLiveTime()!=null) {
+            personageDetailsVo.setLiveTime(DateUtil.parseDateToStr((Func.parseDate(personageDetailsVo.getLiveTime())), DateUtil.Time_Formatter_Day));
+        }
+
+        if (personageDetailsVo.getCheckOutTime()!=null) {
+            personageDetailsVo.setCheckOutTime(DateUtil.parseDateToStr((Func.parseDate(personageDetailsVo.getCheckOutTime())), DateUtil.Time_Formatter_Day));
+        }
+
+        jsonObject.put("code", 200);
+        jsonObject.put("message", "成功");
+        jsonObject.put("success", true);
+        jsonObject.put("comment",commentListVos);
+        jsonObject.put("commentDetails",personageDetailsVo);
+        ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+        return null;
     }
     }
 
 
 
 

+ 273 - 0
mhotel/src/com/happy/action/AppBookingComplaintAction.java

@@ -0,0 +1,273 @@
+package com.happy.action;
+
+import com.happy.Model.BookingComplaint;
+import com.happy.Until.Func;
+import com.happy.Until.ResUtil;
+import com.happy.service.BookingComplaintProgressService;
+import com.happy.service.BookingComplaintService;
+import com.opensymphony.xwork2.ActionSupport;
+import net.sf.json.JSONObject;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.interceptor.ServletRequestAware;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+public class AppBookingComplaintAction extends ActionSupport implements ServletRequestAware {
+
+    public HttpServletRequest request;
+
+    public HttpServletResponse response;
+
+    public HttpServletRequest getRequest() {
+        return request;
+    }
+
+    public void setRequest(HttpServletRequest request) {
+        this.request = request;
+    }
+
+    @Override
+    public void setServletRequest(HttpServletRequest request) {
+        this.request = request;
+    }
+
+    public HttpServletResponse getResponse() {
+        return response;
+    }
+
+    public void setResponse(HttpServletResponse response) {
+        this.response = response;
+    }
+
+    @Resource
+    public BookingComplaintService bookingComplaintService;
+
+    @Resource
+    public BookingComplaintProgressService bookingComplaintProgressService;
+
+    public String bookingId;
+    public String hotelId;
+    public String houseId;
+    public String title;
+    public String content;
+    public String createId;
+    public String createDate;
+    public String modifyDate;
+    public List<String> pictureList;
+
+    public String getBookingId() {
+        return bookingId;
+    }
+
+    public void setBookingId(String bookingId) {
+        this.bookingId = bookingId;
+    }
+
+    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 getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(String createId) {
+        this.createId = createId;
+    }
+
+    public String getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(String createDate) {
+        this.createDate = createDate;
+    }
+
+    public String getModifyDate() {
+        return modifyDate;
+    }
+
+    public void setModifyDate(String modifyDate) {
+        this.modifyDate = modifyDate;
+    }
+
+    public List<String> getPictureList() {
+        return pictureList;
+    }
+
+    public void setPictureList(List<String> pictureList) {
+        this.pictureList = pictureList;
+    }
+
+    public String usersId;
+    public int page; // 页数
+    public int rows;// 每页显示数
+
+    public String getUsersId() {
+        return usersId;
+    }
+
+    public void setUsersId(String usersId) {
+        this.usersId = usersId;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getRows() {
+        return rows;
+    }
+
+    public void setRows(int rows) {
+        this.rows = rows;
+    }
+
+    public String complaintId;
+
+    public String getComplaintId() {
+        return complaintId;
+    }
+
+    public void setComplaintId(String complaintId) {
+        this.complaintId = complaintId;
+    }
+
+
+
+
+    /**
+     * 添加投诉
+     *
+     * @return
+     */
+    public JSONObject orderComplaint() {
+        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)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入投诉数据---orderComplaint");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        int insert =bookingComplaintService.insert(bookingId,hotelId,houseId,title,content,createId,createDate,modifyDate,pictureList);
+
+        if (insert > 0) {
+            jsonObject.put("code", 200);
+            jsonObject.put("message", "成功");
+            jsonObject.put("success", true);
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+        jsonObject.put("message", "未知异常");
+        jsonObject.put("success", false);
+        jsonObject.put("code", 205);
+        ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+        return null;
+    }
+
+    /**
+     * 服务热线
+     * @return
+     */
+    public JSONObject serviceHotline(){
+        JSONObject jsonObject = new JSONObject();
+
+        if (Func.checkNull(complaintId)|| Func.checkNull(createId)|| Func.checkNull(createDate)|| Func.checkNull(modifyDate)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入complaintId数据---serviceHotline");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        int serviceHotlineInsert=bookingComplaintProgressService.serviceHotlineInsert(complaintId,createId,createDate,modifyDate);
+
+        if (serviceHotlineInsert > 0) {
+            jsonObject.put("code", 200);
+            jsonObject.put("message", "成功");
+            jsonObject.put("success", true);
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        jsonObject.put("message", "未知异常");
+        jsonObject.put("success", false);
+        jsonObject.put("code", 205);
+        ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+        return null;
+    }
+
+
+    /**
+     * 投诉进度
+     * @return
+     */
+    public JSONObject complaintPage(){
+        JSONObject jsonObject = new JSONObject();
+
+        if (Func.checkNull(usersId)) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入usersId数据---complaintPage");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+        if (page <= 0 || rows <= 0) {
+            jsonObject.put("code", 400);
+            jsonObject.put("success", false);
+            jsonObject.put("message", "未传入page,rows数据---evaluatePage");
+            ResUtil.writeJson(ServletActionContext.getResponse(), jsonObject.toString());
+            return null;
+        }
+
+
+
+
+        return null;
+    }
+
+
+
+
+
+
+}

+ 43 - 0
mhotel/src/com/happy/common/util/SensitiveWordFilter.java

@@ -0,0 +1,43 @@
+package com.happy.common.util;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.List;
+
+public class SensitiveWordFilter {
+    private List<String> sensitiveWords;
+
+    public SensitiveWordFilter(String filePath) {
+        sensitiveWords = new ArrayList<>();
+        try {
+            BufferedReader reader = new BufferedReader(new FileReader(filePath));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                sensitiveWords.add(line);
+            }
+            reader.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public List<String> getSensitiveWords() {
+        return sensitiveWords;
+    }
+
+    public String filterSensitiveWords(String input) {
+        for (String word : sensitiveWords) {
+            input = input.replaceAll(word, "***");
+        }
+        return input;
+    }
+
+
+    public static void main(String[] args) {
+        SensitiveWordFilter filter = new SensitiveWordFilter("sensitive_words.txt");
+        String input = "这个人很吃饭,不可信。";
+        String filtered = filter.filterSensitiveWords(input);
+        System.out.println(filtered);
+    }
+}

+ 15 - 2
mhotel/src/com/happy/dao/BookingCommentDao.java

@@ -1,8 +1,7 @@
 package com.happy.dao;
 package com.happy.dao;
 
 
 import com.happy.Model.BookingComment;
 import com.happy.Model.BookingComment;
-import com.happy.vo.BookingCommentPageVo;
-import com.happy.vo.EvaluatePageVo;
+import com.happy.vo.*;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -36,4 +35,18 @@ public interface BookingCommentDao {
 
 
     EvaluatePageVo evaluateScore(String hotelId);
     EvaluatePageVo evaluateScore(String hotelId);
 
 
+    List<CommentVo> commentVoList(String bookingCommentId);
+
+    CommentDetailsVo commentDetails(String bookingCommentId);
+
+    List<PersonageCommentVo> personageNotCommentPage(String usersId, int page, int rows);
+
+    List<PersonageCommentVo> personageCommentPage(String usersId, int page, int rows);
+
+    int personageNotCommentTotal(String usersId);
+
+    int personageCommentTotal(String usersId);
+
+    PersonageDetailsVo personageDetails(String bookingCommentId);
+
 }
 }

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

@@ -14,4 +14,8 @@ public interface BookingComplainDao {
     int queryTotal(String sqlx);
     int queryTotal(String sqlx);
 
 
     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);
+
+
+
 }
 }

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

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

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

@@ -3,6 +3,7 @@ package com.happy.dao;
 import com.happy.Model.Booking;
 import com.happy.Model.Booking;
 import com.happy.Model.HouseNumber;
 import com.happy.Model.HouseNumber;
 
 
+import java.awt.print.Book;
 import java.util.List;
 import java.util.List;
 
 
 public interface HouseNumberDao {
 public interface HouseNumberDao {

File diff suppressed because it is too large
+ 309 - 77
mhotel/src/com/happy/dao/impl/BookingCommentDaoImpl.java


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

@@ -5,6 +5,7 @@ import com.happy.Model.BookingComplaint;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.House;
 import com.happy.Model.House;
 import com.happy.Until.SqlUtil;
 import com.happy.Until.SqlUtil;
+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 org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -83,4 +84,36 @@ public class BookingComplainImplDao implements BookingComplainDao {
         if(list != null && list.size()>0) return list.get(0);
         if(list != null && list.size()>0) return list.get(0);
         return null;
         return null;
     }
     }
+
+    @Override
+    public String insert(String bookingId, String hotelId, String houseId, String title, String content, String createId, String createDate, String modifyDate) {
+        String sql = "insert into `booking_complaint` (id,booking_id,hotel_id,house_id,title,content,create_id,create_date,modify_date,status)" +
+                " values (:id,:booking_id,:hotel_id,:house_id,:title,:content,:create_id,:create_date,:modify_date,:status)";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("booking_id",bookingId);
+        sps.addValue("hotel_id",hotelId);
+        sps.addValue("house_id",houseId);
+        sps.addValue("title",title);
+        sps.addValue("content",content);
+        sps.addValue("create_id",createId);
+        sps.addValue("create_date",createDate);
+        sps.addValue("modify_date",modifyDate);
+        sps.addValue("status",1);
+        String id ="TS"+ UUIDUtil.getNewDate();
+        sps.addValue("id", id);
+
+        int num = 0;
+        try {
+            num = namedParameterJdbcTemplate.update(sql, sps);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (num > 0) {
+            return id;
+        } else {
+            id = num + "";
+        }
+        return id;
+
+    }
 }
 }

+ 76 - 0
mhotel/src/com/happy/dao/impl/BookingComplaintProgressImplDao.java

@@ -0,0 +1,76 @@
+package com.happy.dao.impl;
+
+import com.happy.Until.UUIDUtil;
+import com.happy.dao.BookingComplaintProgressDao;
+import com.happy.service.BookingComplaintProgressService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
+import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+import org.springframework.stereotype.Repository;
+
+@Repository("BookingComplaintProgressDao")
+public class BookingComplaintProgressImplDao implements BookingComplaintProgressDao {
+
+    @Autowired
+    private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
+
+    public NamedParameterJdbcTemplate getNamedParameterJdbcTemplate() {
+        return namedParameterJdbcTemplate;
+    }
+
+    public void setNamedParameterJdbcTemplate(
+            NamedParameterJdbcTemplate namedParameterJdbcTemplate) {
+        this.namedParameterJdbcTemplate = namedParameterJdbcTemplate;
+    }
+
+    @Override
+    public int insert(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)";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("complaint_id",complaintId);
+        sps.addValue("progress_type",1);
+        sps.addValue("create_id",createId);
+        sps.addValue("create_date",createDate);
+        sps.addValue("modify_date",modifyDate);
+        sps.addValue("status",1);
+        sps.addValue("id", UUIDUtil.generateID());
+        int num = 0;
+        try{
+            num = namedParameterJdbcTemplate.update(sql, sps);
+        }
+        catch(Exception e){
+            e.printStackTrace();
+        }
+        return num;
+
+    }
+
+    /**
+     * ͶËß·þÎñÈÈÏßÌí¼Ó
+     * @param complaintId
+     * @param createId
+     * @param createDate
+     * @param modifyDate
+     * @return
+     */
+    @Override
+    public int serviceHotlineInsert(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)";
+        MapSqlParameterSource sps = new MapSqlParameterSource();
+        sps.addValue("complaint_id",complaintId);
+        sps.addValue("progress_type",2);
+        sps.addValue("create_id",createId);
+        sps.addValue("create_date",createDate);
+        sps.addValue("modify_date",modifyDate);
+        sps.addValue("status",1);
+        sps.addValue("id", UUIDUtil.generateID());
+        int num = 0;
+        try{
+            num = namedParameterJdbcTemplate.update(sql, sps);
+        }
+        catch(Exception e){
+            e.printStackTrace();
+        }
+        return num;
+    }
+}

+ 5 - 0
mhotel/src/com/happy/dao/impl/HouseNumberImplDao.java

@@ -1,6 +1,7 @@
 package com.happy.dao.impl;
 package com.happy.dao.impl;
 
 
 import com.happy.Model.Booking;
 import com.happy.Model.Booking;
+import com.happy.Model.HotelCoupon;
 import com.happy.Model.HouseNumber;
 import com.happy.Model.HouseNumber;
 import com.happy.Until.UUIDUtil;
 import com.happy.Until.UUIDUtil;
 import com.happy.dao.HouseNumberDao;
 import com.happy.dao.HouseNumberDao;
@@ -12,8 +13,12 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource;
 import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
 import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
+import java.awt.print.Book;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 import java.util.UUID;
 
 
 @Repository("HouseNumberDao")
 @Repository("HouseNumberDao")

+ 5 - 0
mhotel/src/com/happy/dao/impl/HouseNumberStatusImplDao.java

@@ -1,7 +1,10 @@
 package com.happy.dao.impl;
 package com.happy.dao.impl;
 
 
+import com.happy.Model.HouseNumber;
 import com.happy.Model.HouseNumberStatus;
 import com.happy.Model.HouseNumberStatus;
 import com.happy.Until.BeanMapTool;
 import com.happy.Until.BeanMapTool;
+import com.happy.Until.UUIDUtil;
+import com.happy.dao.HouseNumberDao;
 import com.happy.dao.HouseNumberStatusDao;
 import com.happy.dao.HouseNumberStatusDao;
 import com.happy.dto.HouseNumberStatusDto;
 import com.happy.dto.HouseNumberStatusDto;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
@@ -13,8 +16,10 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource;
 import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
 import org.springframework.jdbc.core.namedparam.SqlParameterSourceUtils;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.UUID;
 
 
 @Repository("HouseNumberStatusDao")
 @Repository("HouseNumberStatusDao")
 public class HouseNumberStatusImplDao implements HouseNumberStatusDao {
 public class HouseNumberStatusImplDao implements HouseNumberStatusDao {

+ 10 - 0
mhotel/src/com/happy/service/BookingCommentService.java

@@ -3,10 +3,13 @@ package com.happy.service;
 import com.happy.Model.BookingComment;
 import com.happy.Model.BookingComment;
 import com.happy.Model.FileInfo;
 import com.happy.Model.FileInfo;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.vo.CommentDetailsVo;
+import com.happy.vo.CommentVo;
 import com.happy.vo.EvaluatePageVo;
 import com.happy.vo.EvaluatePageVo;
 import com.happy.Model.HotelCoupon;
 import com.happy.Model.HotelCoupon;
 import com.happy.dto.BookCommentDto;
 import com.happy.dto.BookCommentDto;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.vo.PersonageDetailsVo;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -21,6 +24,7 @@ public interface BookingCommentService {
 
 
     EvaluatePageVo evaluateScore(String hotelId);
     EvaluatePageVo evaluateScore(String hotelId);
 
 
+    List<CommentVo> commentVoList(String bookingCommentId);
 
 
     /**
     /**
      * 描述:查询订单下的所有评论 根据订单id与comment_parent_id为空查询
      * 描述:查询订单下的所有评论 根据订单id与comment_parent_id为空查询
@@ -48,4 +52,10 @@ public interface BookingCommentService {
      * @return 影响数量
      * @return 影响数量
      */
      */
     int insterCommpent(BookingComment bookingComment);
     int insterCommpent(BookingComment bookingComment);
+	
+	 CommentDetailsVo commentDetails(String bookingId);
+
+IPage personageComment(int status, String usersId, int page, int rows);
+
+PersonageDetailsVo personageDetails(String bookingCommentId);
 }
 }

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

@@ -0,0 +1,9 @@
+package com.happy.service;
+
+public interface BookingComplaintProgressService {
+
+    int insert(String complaintId, String createId, String createDate, String modifyDate);
+
+
+    int serviceHotlineInsert(String complaintId, String createId, String createDate, String modifyDate);
+}

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

@@ -31,4 +31,6 @@ public interface BookingComplaintService {
     BookingComplaint getById(String id);
     BookingComplaint getById(String id);
 
 
     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);
 }
 }

+ 80 - 37
mhotel/src/com/happy/service/impl/BookingCommentImplService.java

@@ -9,8 +9,7 @@ import com.happy.service.BookService;
 import com.happy.service.BookingCommentService;
 import com.happy.service.BookingCommentService;
 import com.happy.service.FileService;
 import com.happy.service.FileService;
 import com.happy.service.HouseService;
 import com.happy.service.HouseService;
-import com.happy.vo.BookingCommentPageVo;
-import com.happy.vo.EvaluatePageVo;
+import com.happy.vo.*;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
@@ -37,9 +36,8 @@ public class BookingCommentImplService implements BookingCommentService {
     FileService fileService;
     FileService fileService;
 
 
 
 
-
     /**
     /**
-     * �������
+     * 添加评论
      *
      *
      * @param pictureList
      * @param pictureList
      * @param bookingComment
      * @param bookingComment
@@ -47,17 +45,17 @@ public class BookingCommentImplService implements BookingCommentService {
      */
      */
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public int orderRate( BookingComment bookingComment,List<String> pictureList) {
+    public int orderRate(BookingComment bookingComment, List<String> pictureList) {
 
 
-//        ������۱���������
+//        添加评论表并返回主键
 
 
         String id = bookingCommentDao.insertBookingComment(bookingComment);
         String id = bookingCommentDao.insertBookingComment(bookingComment);
         int i = 1;
         int i = 1;
-        if (pictureList.size() > 0) {
+        if (pictureList != null && pictureList.size() > 0) {
             List<FileInfo> fileInfoList = new ArrayList<>();
             List<FileInfo> fileInfoList = new ArrayList<>();
             for (String s : pictureList) {
             for (String s : pictureList) {
                 String[] split = s.split("/");
                 String[] split = s.split("/");
-                String s1 = split[split.length-1];
+                String s1 = split[split.length - 1];
                 FileInfo fileInfo = new FileInfo();
                 FileInfo fileInfo = new FileInfo();
                 fileInfo.setLinkId(id);
                 fileInfo.setLinkId(id);
                 fileInfo.setName(s1);
                 fileInfo.setName(s1);
@@ -81,12 +79,12 @@ public class BookingCommentImplService implements BookingCommentService {
         IPage<BookingCommentPageVo> iPage = new IPage();
         IPage<BookingCommentPageVo> iPage = new IPage();
         List<BookingCommentPageVo> vos = null;
         List<BookingCommentPageVo> vos = null;
         int total = 0;
         int total = 0;
-//      ȫ��
+//      全部
         if (status == 0) {
         if (status == 0) {
             vos = bookingCommentDao.evaluatePage(hotelId, page, rows);
             vos = bookingCommentDao.evaluatePage(hotelId, page, rows);
             total = bookingCommentDao.evaluateTotal(hotelId);
             total = bookingCommentDao.evaluateTotal(hotelId);
         } else if (status == 1) {
         } else if (status == 1) {
-//            ��ͼ
+//            带图
             vos = bookingCommentDao.evaluatePagepicture(hotelId, page, rows);
             vos = bookingCommentDao.evaluatePagepicture(hotelId, page, rows);
             total = bookingCommentDao.evaluateTotalpicture(hotelId);
             total = bookingCommentDao.evaluateTotalpicture(hotelId);
         } else if (status == 2) {
         } else if (status == 2) {
@@ -100,12 +98,17 @@ public class BookingCommentImplService implements BookingCommentService {
         iPage.setPageList(vos);
         iPage.setPageList(vos);
         return iPage;
         return iPage;
 
 
-
     }
     }
 
 
+
     @Override
     @Override
     public EvaluatePageVo evaluateScore(String hotelId) {
     public EvaluatePageVo evaluateScore(String hotelId) {
-        return  bookingCommentDao.evaluateScore(hotelId);
+        return bookingCommentDao.evaluateScore(hotelId);
+    }
+
+    @Override
+    public List<CommentVo> commentVoList(String bookingCommentId) {
+        return bookingCommentDao.commentVoList(bookingCommentId);
     }
     }
 
 
     @Override
     @Override
@@ -122,13 +125,13 @@ public class BookingCommentImplService implements BookingCommentService {
     }
     }
 
 
     @Override
     @Override
-    public IPage<BookingComment> queryPage(String sqlx,String sql, int page, int rows) {
+    public IPage<BookingComment> queryPage(String sqlx, String sql, int page, int rows) {
         IPage<BookingComment> iPage = new IPage();
         IPage<BookingComment> iPage = new IPage();
-        List<BookingComment> hotelCouponList = bookingCommentDao.queryPage(sqlx,page,rows);
+        List<BookingComment> hotelCouponList = bookingCommentDao.queryPage(sqlx, page, rows);
         int total = bookingCommentDao.queryTotal(sql);
         int total = bookingCommentDao.queryTotal(sql);
         iPage.setPageList(hotelCouponList);
         iPage.setPageList(hotelCouponList);
         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);
         iPage.setTotal(total);
         iPage.setTotal(total);
         return iPage;
         return iPage;
@@ -151,14 +154,51 @@ public class BookingCommentImplService implements BookingCommentService {
         comment.setCommentStatus("2");
         comment.setCommentStatus("2");
         int m = bookingCommentDao.updateCommpentStatus(comment);
         int m = bookingCommentDao.updateCommpentStatus(comment);
         int i = bookingCommentDao.insterCommpent(bookingComment);
         int i = bookingCommentDao.insterCommpent(bookingComment);
-        if (i > 0 && m >0){
+        if (i > 0 && m > 0) {
             return i;
             return i;
-        }else {
+        } else {
             return 0;
             return 0;
         }
         }
     }
     }
 
 
     @Override
     @Override
+    public CommentDetailsVo commentDetails(String bookingId) {
+        return bookingCommentDao.commentDetails(bookingId);
+    }
+
+    @Override
+    public IPage personageComment(int status, String usersId, int page, int rows) {
+        IPage<PersonageCommentVo> iPage = new IPage();
+        List<PersonageCommentVo> vos = null;
+        int total = 0;
+//      待评价
+        if (status == 0) {
+            vos = bookingCommentDao.personageNotCommentPage(usersId, page, rows);
+            total = bookingCommentDao.personageNotCommentTotal(usersId);
+        } else if (status == 1) {
+//            已评价
+            vos = bookingCommentDao.personageCommentPage(usersId, page, rows);
+            total = bookingCommentDao.personageCommentTotal(usersId);
+//        } else if (status == 2) {
+//            vos = bookingCommentDao.evaluatePageComment(hotelId, page, rows);
+//            total = bookingCommentDao.evaluateTotalComment(hotelId);
+        }
+        iPage.setPage(page);
+        iPage.setTotalPage((int) Math.ceil((double) total / rows));
+        iPage.setRows(rows);
+        iPage.setTotal(total);
+        iPage.setPageList(vos);
+        return iPage;
+    }
+
+
+    @Override
+    public PersonageDetailsVo personageDetails(String bookingCommentId) {
+        return bookingCommentDao.personageDetails(bookingCommentId);
+    }
+
+
+    @Override
     public BookCommentDto getById(String bookId) {
     public BookCommentDto getById(String bookId) {
         List<BookingComment> list = bookingCommentDao.getByBookId(bookId);
         List<BookingComment> list = bookingCommentDao.getByBookId(bookId);
         if (list == null) return null;
         if (list == null) return null;
@@ -169,10 +209,10 @@ public class BookingCommentImplService implements BookingCommentService {
             List<FileInfo> fileInfos = fileDao.queryList("and link_id ='" + comment.getId() + "'");
             List<FileInfo> fileInfos = fileDao.queryList("and link_id ='" + comment.getId() + "'");
             bookCommentDto.setFileInfos(fileInfos);
             bookCommentDto.setFileInfos(fileInfos);
         }
         }
-        for (BookingComment bookingComment : list){
+        for (BookingComment bookingComment : list) {
             List<BookingComment> listByParentId = bookingCommentDao.getByParentId(bookingComment.getId());
             List<BookingComment> listByParentId = bookingCommentDao.getByParentId(bookingComment.getId());
             List<BookingComment> bookingCommentList = new ArrayList<>();
             List<BookingComment> bookingCommentList = new ArrayList<>();
-            for (BookingComment parentComment : listByParentId){
+            for (BookingComment parentComment : listByParentId) {
                 bookingCommentList.add(getComment(parentComment));
                 bookingCommentList.add(getComment(parentComment));
             }
             }
             bookingComment.setLowCommentList(bookingCommentList);
             bookingComment.setLowCommentList(bookingCommentList);
@@ -180,20 +220,23 @@ public class BookingCommentImplService implements BookingCommentService {
         bookCommentDto.setBookingCommentList(list);
         bookCommentDto.setBookingCommentList(list);
         return bookCommentDto;
         return bookCommentDto;
     }
     }
-    public BookingComment getComment(BookingComment parentComment){
-      if(parentComment!=null){
-         List<BookingComment> parentCommentList = bookingCommentDao.getByCommentId(parentComment.getId());
-         List<BookingComment> list = new ArrayList<>();
-          if(parentComment != null && parentCommentList != null){
-              for(BookingComment low : parentCommentList){//一级评论
-                  list.add(low);
-                  getLowcomment(low,list);
-              }
-              parentComment.setLowCommentList(list);
-          }
-      }
-      return parentComment;
-    };
+
+    public BookingComment getComment(BookingComment parentComment) {
+        if (parentComment != null) {
+            List<BookingComment> parentCommentList = bookingCommentDao.getByCommentId(parentComment.getId());
+            List<BookingComment> list = new ArrayList<>();
+            if (parentComment != null && parentCommentList != null) {
+                for (BookingComment low : parentCommentList) {//一级评论
+                    list.add(low);
+                    getLowcomment(low, list);
+                }
+                parentComment.setLowCommentList(list);
+            }
+        }
+        return parentComment;
+    }
+
+    ;
 
 
 //    private void getLowcomment(BookingComment comment){
 //    private void getLowcomment(BookingComment comment){
 //        List<BookingComment> list = new ArrayList<>();
 //        List<BookingComment> list = new ArrayList<>();
@@ -209,13 +252,13 @@ public class BookingCommentImplService implements BookingCommentService {
 //        }
 //        }
 //    }
 //    }
 
 
-    private void getLowcomment(BookingComment comment,List<BookingComment> parentCommentList){
+    private void getLowcomment(BookingComment comment, List<BookingComment> parentCommentList) {
         List<BookingComment> list = new ArrayList<>();
         List<BookingComment> list = new ArrayList<>();
         List<BookingComment> low = bookingCommentDao.getByCommentId(comment.getId());
         List<BookingComment> low = bookingCommentDao.getByCommentId(comment.getId());
-        if(low!=null){
-            for(BookingComment low1 : low){
+        if (low != null) {
+            for (BookingComment low1 : low) {
                 parentCommentList.add(low1);
                 parentCommentList.add(low1);
-                getLowcomment(low1,parentCommentList);
+                getLowcomment(low1, parentCommentList);
             }
             }
         }
         }
     }
     }

+ 57 - 0
mhotel/src/com/happy/service/impl/BookingComplaintImplService.java

@@ -8,10 +8,14 @@ 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;
 import com.happy.dto.IPage;
 import com.happy.dto.IPage;
+import com.happy.service.BookingComplaintProgressService;
 import com.happy.service.BookingComplaintService;
 import com.happy.service.BookingComplaintService;
+import com.happy.service.FileService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 @Service("BookingComplaintService")
 @Service("BookingComplaintService")
@@ -22,6 +26,11 @@ public class BookingComplaintImplService implements BookingComplaintService {
     @Resource
     @Resource
     public FileInfoDao fileDao;
     public FileInfoDao fileDao;
 
 
+@Resource
+    public FileService fileService;
+    @Resource
+    public BookingComplaintProgressService bookingComplaintProgressService;
+
     @Override
     @Override
     public IPage<BookingComplaint> queryPage(String sqlx,String sql, int page, int rows) {
     public IPage<BookingComplaint> queryPage(String sqlx,String sql, int page, int rows) {
         IPage<BookingComplaint> iPage = new IPage();
         IPage<BookingComplaint> iPage = new IPage();
@@ -52,4 +61,52 @@ public class BookingComplaintImplService implements BookingComplaintService {
     public List<BookingComplaint> toComplainExcel(String sqlx) {
     public List<BookingComplaint> toComplainExcel(String sqlx) {
         return bookingComplainDao.toComplainExcel(sqlx);
         return bookingComplainDao.toComplainExcel(sqlx);
     }
     }
+	/**
+     * 添加投诉
+     * @param bookingId
+     * @param hotelId
+     * @param houseId
+     * @param title
+     * @param content
+     * @param createId
+     * @param createDate
+     * @param modifyDate
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int insert(String bookingId, String hotelId, String houseId, String title, String content, String createId, String createDate, String modifyDate,List<String> pictureList) {
+
+//        返回主键id
+        String complaintId=bookingComplainDao.insert(bookingId,hotelId,houseId,title,content,createId,createDate,modifyDate);
+        int i = 1;
+//        ͼƬ
+        if (pictureList != null && pictureList.size() > 0) {
+            List<FileInfo> fileInfoList = new ArrayList<>();
+            for (String s : pictureList) {
+                String[] split = s.split("/");
+                String s1 = split[split.length - 1];
+                FileInfo fileInfo = new FileInfo();
+                fileInfo.setLinkId(complaintId);
+                fileInfo.setName(s1);
+                fileInfo.setUrl(s);
+
+                fileInfoList.add(fileInfo);
+            }
+
+            i = fileService.batchInsertFile(fileInfoList);
+        }
+
+        int cpInsert=bookingComplaintProgressService.insert(complaintId,createId,createDate,modifyDate);
+
+        if (Long.valueOf(complaintId) > 0 && i > 0 && cpInsert>0) {
+            return i;
+        } else {
+            return 0;
+        }
+
+    }
+
+
+	
 }
 }

+ 25 - 0
mhotel/src/com/happy/service/impl/BookingComplaintProgressImplService.java

@@ -0,0 +1,25 @@
+package com.happy.service.impl;
+
+import com.happy.dao.BookingComplaintProgressDao;
+import com.happy.dao.FileInfoDao;
+import com.happy.service.BookingComplaintProgressService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service("BookingComplaintProgressService")
+public class BookingComplaintProgressImplService implements BookingComplaintProgressService {
+
+    @Resource
+    public BookingComplaintProgressDao bookingComplaintProgressDao;
+
+    @Override
+    public int insert(String complaintId, String createId, String createDate, String modifyDate) {
+        return bookingComplaintProgressDao.insert(complaintId,createId,createDate,modifyDate);
+    }
+
+    @Override
+    public int serviceHotlineInsert(String complaintId, String createId, String createDate, String modifyDate) {
+        return bookingComplaintProgressDao.serviceHotlineInsert(complaintId,createId,createDate,modifyDate);
+    }
+}

+ 177 - 0
mhotel/src/com/happy/vo/CommentDetailsVo.java

@@ -0,0 +1,177 @@
+package com.happy.vo;
+
+public class CommentDetailsVo {
+    //    id
+    private String id;
+
+    //    评论人
+    private String userName;
+
+    //    评论头像
+    private String headPhoto;
+
+    //    评论评分
+    private Double score;
+
+    //   入住时间
+    private String liveTime;
+
+    //    评论时间
+    private String commentTime;
+
+    //  房型
+    private String houseName;
+
+    //    内容
+    private String content;
+
+    //    照片
+    private String url;
+
+    //    名宿名称
+    private String hotelName;
+
+    //    名宿评分
+    private Double hotelScore;
+
+    //    所属城镇
+    private String hotelTownship;
+
+    //    酒店类型
+    private String hotelType;
+
+    //    评论次数
+    private int commentCount;
+
+    @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 +
+                '}';
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getHeadPhoto() {
+        return headPhoto;
+    }
+
+    public void setHeadPhoto(String headPhoto) {
+        this.headPhoto = headPhoto;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public String getLiveTime() {
+        return liveTime;
+    }
+
+    public void setLiveTime(String liveTime) {
+        this.liveTime = liveTime;
+    }
+
+    public String getCommentTime() {
+        return commentTime;
+    }
+
+    public void setCommentTime(String commentTime) {
+        this.commentTime = commentTime;
+    }
+
+    public String getHouseName() {
+        return houseName;
+    }
+
+    public void setHouseName(String houseName) {
+        this.houseName = houseName;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getHotelName() {
+        return hotelName;
+    }
+
+    public void setHotelName(String hotelName) {
+        this.hotelName = hotelName;
+    }
+
+    public Double getHotelScore() {
+        return hotelScore;
+    }
+
+    public void setHotelScore(Double hotelScore) {
+        this.hotelScore = hotelScore;
+    }
+
+    public String getHotelTownship() {
+        return hotelTownship;
+    }
+
+    public void setHotelTownship(String hotelTownship) {
+        this.hotelTownship = hotelTownship;
+    }
+
+    public String getHotelType() {
+        return hotelType;
+    }
+
+    public void setHotelType(String hotelType) {
+        this.hotelType = hotelType;
+    }
+
+    public int getCommentCount() {
+        return commentCount;
+    }
+
+    public void setCommentCount(int commentCount) {
+        this.commentCount = commentCount;
+    }
+}

+ 91 - 0
mhotel/src/com/happy/vo/CommentListVo.java

@@ -0,0 +1,91 @@
+package com.happy.vo;
+
+import lombok.Builder;
+
+import java.util.List;
+@Builder
+public class CommentListVo {
+//    本次评论id
+    private String id;
+//    上级id
+    private String commentId;
+//    回复人名称
+    private String commentName;
+//    本次评价名称
+    private String userName;
+//    本次评价头像
+    private String headPhoto;
+//    评价时间
+    private String dateTime;
+//    本次评价内容
+    private String content;
+
+//    子级内容
+    private List<CommentListVo> commentVoList;
+
+
+
+    public String getDateTime() {
+        return dateTime;
+    }
+
+    public void setDateTime(String dateTime) {
+        this.dateTime = dateTime;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCommentId() {
+        return commentId;
+    }
+
+    public void setCommentId(String commentId) {
+        this.commentId = commentId;
+    }
+
+    public String getCommentName() {
+        return commentName;
+    }
+
+    public void setCommentName(String commentName) {
+        this.commentName = commentName;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getHeadPhoto() {
+        return headPhoto;
+    }
+
+    public void setHeadPhoto(String headPhoto) {
+        this.headPhoto = headPhoto;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public List<CommentListVo> getCommentVoList() {
+        return commentVoList;
+    }
+
+    public void setCommentVoList(List<CommentListVo> commentVoList) {
+        this.commentVoList = commentVoList;
+    }
+}

+ 74 - 0
mhotel/src/com/happy/vo/CommentVo.java

@@ -0,0 +1,74 @@
+package com.happy.vo;
+
+public class CommentVo {
+    //    本次评论id
+    private String id;
+    //    上级id
+    private String commentId;
+    //    回复人名称
+    private String commentName;
+    //    本次评价名称
+    private String userName;
+    //    本次评价头像
+    private String headPhoto;
+    //    评价时间
+    private String dateTime;
+    //    本次评价内容
+    private String content;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCommentId() {
+        return commentId;
+    }
+
+    public void setCommentId(String commentId) {
+        this.commentId = commentId;
+    }
+
+    public String getCommentName() {
+        return commentName;
+    }
+
+    public void setCommentName(String commentName) {
+        this.commentName = commentName;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getHeadPhoto() {
+        return headPhoto;
+    }
+
+    public void setHeadPhoto(String headPhoto) {
+        this.headPhoto = headPhoto;
+    }
+
+    public String getDateTime() {
+        return dateTime;
+    }
+
+    public void setDateTime(String dateTime) {
+        this.dateTime = dateTime;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 18 - 0
mhotel/src/com/happy/vo/ComplaintPageVo.java

@@ -0,0 +1,18 @@
+package com.happy.vo;
+
+public class ComplaintPageVo {
+
+    private String id;
+
+    private String title;
+
+    private String dateTime;
+
+    private String hotelName;
+
+//    private String
+
+
+
+
+}

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

@@ -0,0 +1,92 @@
+package com.happy.vo;
+
+public class PersonageCommentVo {
+//    订单id
+    private String id;
+//    评论id
+    private String bookingCommentId;
+//    名宿名称
+    private String hotelName;
+
+//     订房数量
+    private Integer houseOrderNumber;
+
+//    房型名称
+    private String houseName;
+
+//    入住时间
+    private String liveTime;
+
+//    离店时间
+    private String checkOutTime;
+
+//    实际支付金额
+    private Double payAccount;
+
+//  房型图片
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getBookingCommentId() {
+        return bookingCommentId;
+    }
+
+    public void setBookingCommentId(String bookingCommentId) {
+        this.bookingCommentId = bookingCommentId;
+    }
+
+    public String getHotelName() {
+        return hotelName;
+    }
+
+    public void setHotelName(String hotelName) {
+        this.hotelName = hotelName;
+    }
+
+    public Integer getHouseOrderNumber() {
+        return houseOrderNumber;
+    }
+
+    public void setHouseOrderNumber(Integer houseOrderNumber) {
+        this.houseOrderNumber = houseOrderNumber;
+    }
+
+    public String getHouseName() {
+        return houseName;
+    }
+
+    public void setHouseName(String houseName) {
+        this.houseName = houseName;
+    }
+
+    public String getLiveTime() {
+        return liveTime;
+    }
+
+    public void setLiveTime(String liveTime) {
+        this.liveTime = liveTime;
+    }
+
+    public String getCheckOutTime() {
+        return checkOutTime;
+    }
+
+    public void setCheckOutTime(String checkOutTime) {
+        this.checkOutTime = checkOutTime;
+    }
+
+    public Double getPayAccount() {
+        return payAccount;
+    }
+
+    public void setPayAccount(Double payAccount) {
+        this.payAccount = payAccount;
+    }
+}

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

@@ -0,0 +1,127 @@
+package com.happy.vo;
+
+public class PersonageDetailsVo {
+
+    //    id
+    private String id;
+
+    //    评论时间
+    private String commentTime;
+
+    //    评论评分
+    private Double score;
+
+    //    内容
+    private String content;
+
+    //    照片
+    private String url;
+
+    //    名宿名称
+    private String hotelName;
+
+    //     订房数量
+    private Integer houseOrderNumber;
+
+    //    房型名称
+    private String houseName;
+
+    //    入住时间
+    private String liveTime;
+
+    //    离店时间
+    private String checkOutTime;
+
+    //    实际支付金额
+    private Double payAccount;
+
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCommentTime() {
+        return commentTime;
+    }
+
+    public void setCommentTime(String commentTime) {
+        this.commentTime = commentTime;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getHotelName() {
+        return hotelName;
+    }
+
+    public void setHotelName(String hotelName) {
+        this.hotelName = hotelName;
+    }
+
+    public Integer getHouseOrderNumber() {
+        return houseOrderNumber;
+    }
+
+    public void setHouseOrderNumber(Integer houseOrderNumber) {
+        this.houseOrderNumber = houseOrderNumber;
+    }
+
+    public String getHouseName() {
+        return houseName;
+    }
+
+    public void setHouseName(String houseName) {
+        this.houseName = houseName;
+    }
+
+    public String getLiveTime() {
+        return liveTime;
+    }
+
+    public void setLiveTime(String liveTime) {
+        this.liveTime = liveTime;
+    }
+
+    public String getCheckOutTime() {
+        return checkOutTime;
+    }
+
+    public void setCheckOutTime(String checkOutTime) {
+        this.checkOutTime = checkOutTime;
+    }
+
+    public Double getPayAccount() {
+        return payAccount;
+    }
+
+    public void setPayAccount(Double payAccount) {
+        this.payAccount = payAccount;
+    }
+}

+ 2 - 0
mhotel/src/struts.xml

@@ -56,6 +56,8 @@
 		<action name="amp*" method = "{1}" class="com.happy.action.AppMePageAction"></action>
 		<action name="amp*" method = "{1}" class="com.happy.action.AppMePageAction"></action>
 		<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>
+
 	</package>
 	</package>
 	<package name="interfaces" namespace="/interfaces" extends="struts-default">
 	<package name="interfaces" namespace="/interfaces" extends="struts-default">
 		<!-- 接口总调度开始 -->
 		<!-- 接口总调度开始 -->