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