|
|
@@ -7,9 +7,9 @@ import com.happy.Until.Func;
|
|
|
import com.happy.Until.ResponseUtil;
|
|
|
import com.happy.Until.ResultUtil;
|
|
|
import com.happy.constant.ResultStatusCode;
|
|
|
+import com.happy.dao.UserVisitsDao;
|
|
|
import com.happy.dto.IPage;
|
|
|
import com.happy.service.AppHomePageService;
|
|
|
-import com.happy.service.BookService;
|
|
|
import com.happy.service.FileService;
|
|
|
import com.happy.service.HotelService;
|
|
|
import com.opensymphony.xwork2.ActionSupport;
|
|
|
@@ -31,7 +31,7 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
public HttpServletResponse response;
|
|
|
|
|
|
@Resource
|
|
|
- public BookService bookService;
|
|
|
+ public UserVisitsDao userVisitsDao;
|
|
|
@Resource
|
|
|
public AppHomePageService appHomePageService;
|
|
|
@Resource
|
|
|
@@ -51,8 +51,7 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
public String userCode; // 第一次进来获取用户的code
|
|
|
public String queryValue; // 首页查寻搜索关键词
|
|
|
private String hotel_township; // 所属乡镇
|
|
|
- public Date startTimeQuery; // 查询订房开始时间
|
|
|
- public Date endTimeQuery; // 查询订房结束时间
|
|
|
+ private String userId; // 用户id
|
|
|
|
|
|
public HttpServletRequest getRequest() {
|
|
|
return request;
|
|
|
@@ -118,6 +117,9 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
{
|
|
|
// 获取民宿列表
|
|
|
IPage iPage = appHomePageService.getHotelList(queryValue, hotel_township,page,rows);
|
|
|
+
|
|
|
+ // 用户访问量数据
|
|
|
+ userVisitsDao.add(userId);
|
|
|
ResponseUtil.writeJsonIPage(ServletActionContext.getResponse(),iPage);
|
|
|
return null;
|
|
|
}
|
|
|
@@ -212,23 +214,9 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
this.hotelId = hotelId;
|
|
|
}
|
|
|
|
|
|
- public Date getStartTimeQuery() {
|
|
|
- return startTimeQuery;
|
|
|
- }
|
|
|
-
|
|
|
- public void setStartTimeQuery(Date startTimeQuery) {
|
|
|
- this.startTimeQuery = startTimeQuery;
|
|
|
- }
|
|
|
-
|
|
|
- public Date getEndTimeQuery() {
|
|
|
- return endTimeQuery;
|
|
|
- }
|
|
|
-
|
|
|
- public void setEndTimeQuery(Date endTimeQuery) {
|
|
|
- this.endTimeQuery = endTimeQuery;
|
|
|
- }
|
|
|
|
|
|
public void setHotel_township(String hotel_township) {
|
|
|
this.hotel_township = hotel_township;
|
|
|
}
|
|
|
+
|
|
|
}
|