Selaa lähdekoodia

更新文件 advertiseAction.java

陈士柏 2 vuotta sitten
vanhempi
commit
b74adcc7f1
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      mhotel/src/com/happy/action/advertiseAction.java

+ 6 - 3
mhotel/src/com/happy/action/advertiseAction.java

@@ -260,11 +260,14 @@ public class advertiseAction extends ActionSupport implements ServletRequestAwar
                 advertise.setTownId(articleTweet.getLocationId());
                 advertise.setTownId(articleTweet.getLocationId());
             }
             }
             if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿") && !advertise.getJumpPoint().equals("首页")){
             if (advertise.getJumpWay().equals("小程序") && advertise.getJumpDirection().equals("民宿") && !advertise.getJumpPoint().equals("首页")){
-                Hotel hotelList = hotelService.getById(Integer.parseInt(advertise.getJumpPoint()));
-                if (hotelList!=null){
-                    AdminManager adminManager = adminManagerService.getById(hotelList.getManagerId());
+                if (!listy.getJumpPoint().equals(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());
+                    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());