|
|
@@ -187,7 +187,14 @@ public class adminManagerAction extends ActionSupport implements ServletRequestA
|
|
|
}
|
|
|
}
|
|
|
int m = adminManagerService.insertAdmin(admin);
|
|
|
- if (m > 0) {
|
|
|
+ //region 往hotel表中插入一条数据关联admin_manager
|
|
|
+ Hotel hotel = new Hotel();
|
|
|
+ hotel.setManagerId(admin.getManagerId());
|
|
|
+ hotel.setHotel_name(admin.getHotelName());
|
|
|
+ hotel.setStatus(1);
|
|
|
+ int i = hotelService.insertHotel(hotel);
|
|
|
+ //endregion
|
|
|
+ if (m > 0 && i > 0) {
|
|
|
resultJson.put("message", "添加成功");
|
|
|
resultJson.put("code", 200);
|
|
|
ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
|