|
@@ -165,14 +165,18 @@ public class advertiseAction extends ActionSupport implements ServletRequestAwar
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
advertise.setCreateTime(TimeExchange.getTime());
|
|
advertise.setCreateTime(TimeExchange.getTime());
|
|
|
|
|
+ if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略") && !advertise.getJumpPoint().equals("首页")){
|
|
|
|
|
+ ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
|
|
|
+ advertise.setTownId(articleTweet.getLocationId());
|
|
|
|
|
+ }
|
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿") && !advertise.getJumpPoint().equals("首页")){
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿") && !advertise.getJumpPoint().equals("首页")){
|
|
|
AdminManager adminManager = adminManagerService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
AdminManager adminManager = adminManagerService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
|
HotelDict hotelDict = hotelDictService.getById(Integer.parseInt(adminManager.getHotelTownship()));
|
|
HotelDict hotelDict = hotelDictService.getById(Integer.parseInt(adminManager.getHotelTownship()));
|
|
|
advertise.setTownId(hotelDict.getName());
|
|
advertise.setTownId(hotelDict.getName());
|
|
|
- }
|
|
|
|
|
- if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略") && !advertise.getJumpPoint().equals("首页")){
|
|
|
|
|
- ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
|
|
|
- advertise.setTownId(articleTweet.getLocationId());
|
|
|
|
|
|
|
+ List<Hotel> hotelList = hotelService.queryList(" and manager_id='"+adminManager.getId()+"' ");
|
|
|
|
|
+ if (hotelList!=null){
|
|
|
|
|
+ advertise.setJumpPoint(String.valueOf(hotelList.get(0).getId()));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
int m = advertiseService.insertAdvertise(advertise);
|
|
int m = advertiseService.insertAdvertise(advertise);
|
|
|
if (m > 0) {
|
|
if (m > 0) {
|
|
@@ -251,15 +255,18 @@ public class advertiseAction extends ActionSupport implements ServletRequestAwar
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略") && !advertise.getJumpPoint().equals("首页")){
|
|
|
|
|
+ ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
|
|
|
+ advertise.setTownId(articleTweet.getLocationId());
|
|
|
|
|
+ }
|
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿") && !advertise.getJumpPoint().equals("首页")){
|
|
if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿") && !advertise.getJumpPoint().equals("首页")){
|
|
|
AdminManager adminManager = adminManagerService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
AdminManager adminManager = adminManagerService.getById(Integer.parseInt(advertise.getJumpPoint()));
|
|
|
HotelDict hotelDict = hotelDictService.getById(Integer.parseInt(adminManager.getHotelTownship()));
|
|
HotelDict hotelDict = hotelDictService.getById(Integer.parseInt(adminManager.getHotelTownship()));
|
|
|
advertise.setTownId(hotelDict.getName());
|
|
advertise.setTownId(hotelDict.getName());
|
|
|
- }
|
|
|
|
|
- if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("攻略") && !advertise.getJumpPoint().equals("首页")){
|
|
|
|
|
- ArticleTweet articleTweet = articleTweetService.queryArticleById(advertise.getJumpPoint(),null);
|
|
|
|
|
- advertise.setTownId(articleTweet.getLocationId());
|
|
|
|
|
|
|
+ List<Hotel> hotelList = hotelService.queryList(" and manager_id='"+adminManager.getId()+"' ");
|
|
|
|
|
+ if (hotelList!=null){
|
|
|
|
|
+ advertise.setJumpPoint(String.valueOf(hotelList.get(0).getId()));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
advertise.setCreateTime(TimeExchange.getTime());
|
|
advertise.setCreateTime(TimeExchange.getTime());
|
|
|
int m = advertiseService.updateAdvertise(advertise);
|
|
int m = advertiseService.updateAdvertise(advertise);
|