|
@@ -3,20 +3,14 @@ package com.happy.action;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.Gson;
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
-import com.happy.Model.AdminManager;
|
|
|
|
|
-import com.happy.Model.Advertise;
|
|
|
|
|
-import com.happy.Model.ArticleTweet;
|
|
|
|
|
-import com.happy.Model.Hotel;
|
|
|
|
|
|
|
+import com.happy.Model.*;
|
|
|
import com.happy.Model.app.Around_product;
|
|
import com.happy.Model.app.Around_product;
|
|
|
import com.happy.Model.app.Arounds;
|
|
import com.happy.Model.app.Arounds;
|
|
|
import com.happy.Until.GetHttpParam;
|
|
import com.happy.Until.GetHttpParam;
|
|
|
import com.happy.Until.ResUtil;
|
|
import com.happy.Until.ResUtil;
|
|
|
import com.happy.Until.ResponseUtil;
|
|
import com.happy.Until.ResponseUtil;
|
|
|
import com.happy.Until.TimeExchange;
|
|
import com.happy.Until.TimeExchange;
|
|
|
-import com.happy.service.AdminManagerService;
|
|
|
|
|
-import com.happy.service.AdvertiseService;
|
|
|
|
|
-import com.happy.service.ArticleTweetService;
|
|
|
|
|
-import com.happy.service.HotelService;
|
|
|
|
|
|
|
+import com.happy.service.*;
|
|
|
import com.opensymphony.xwork2.ActionSupport;
|
|
import com.opensymphony.xwork2.ActionSupport;
|
|
|
import org.apache.struts2.ServletActionContext;
|
|
import org.apache.struts2.ServletActionContext;
|
|
|
import org.apache.struts2.interceptor.ServletRequestAware;
|
|
import org.apache.struts2.interceptor.ServletRequestAware;
|
|
@@ -41,6 +35,8 @@ public class advertiseAction extends ActionSupport implements ServletRequestAwar
|
|
|
public HotelService hotelService;
|
|
public HotelService hotelService;
|
|
|
@Resource
|
|
@Resource
|
|
|
public ArticleTweetService articleTweetService;
|
|
public ArticleTweetService articleTweetService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ public HotelDictService hotelDictService;
|
|
|
|
|
|
|
|
public Integer id;
|
|
public Integer id;
|
|
|
public int page; // 当前页
|
|
public int page; // 当前页
|
|
@@ -169,7 +165,8 @@ public class advertiseAction extends ActionSupport implements ServletRequestAwar
|
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿")){
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿")){
|
|
|
Hotel hotel = hotelService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
Hotel hotel = hotelService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
|
AdminManager adminManager = adminManagerService.getById(hotel.getManagerId());
|
|
AdminManager adminManager = adminManagerService.getById(hotel.getManagerId());
|
|
|
- advertise.setTownId(adminManager.getHotelTownship());
|
|
|
|
|
|
|
+ HotelDict hotelDict = hotelDictService.getById(Integer.parseInt(adminManager.getHotelTownship()));
|
|
|
|
|
+ advertise.setTownId(hotelDict.getName());
|
|
|
}
|
|
}
|
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略")){
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略")){
|
|
|
ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
@@ -247,7 +244,8 @@ public class advertiseAction extends ActionSupport implements ServletRequestAwar
|
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿")){
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿")){
|
|
|
Hotel hotel = hotelService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
Hotel hotel = hotelService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
|
AdminManager adminManager = adminManagerService.getById(hotel.getManagerId());
|
|
AdminManager adminManager = adminManagerService.getById(hotel.getManagerId());
|
|
|
- advertise.setTownId(adminManager.getHotelTownship());
|
|
|
|
|
|
|
+ HotelDict hotelDict = hotelDictService.getById(Integer.parseInt(adminManager.getHotelTownship()));
|
|
|
|
|
+ advertise.setTownId(hotelDict.getName());
|
|
|
}
|
|
}
|
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略")){
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略")){
|
|
|
ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|