use of com.ruoyi.system.domain.HouseVillage in project Rental-Information-Platform by who1sBruce.
the class HouseRoomController method add.
/**
* 新增房源详情
*/
@GetMapping("/add")
public String add(ModelMap mmap) {
List<HouseVillage> list = houseVillageService.selectHouseVillageList(new HouseVillage());
mmap.put("villageList", list);
return prefix + "/add";
}
use of com.ruoyi.system.domain.HouseVillage in project Rental-Information-Platform by who1sBruce.
the class HouseRoomController method edit.
/**
* 修改房源详情
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap) {
HouseRoom houseRoom = houseRoomService.selectHouseRoomById(id);
mmap.put("houseRoom", houseRoom);
List<HouseVillage> list = houseVillageService.selectHouseVillageList(new HouseVillage());
mmap.put("villageList", list);
return prefix + "/edit";
}
use of com.ruoyi.system.domain.HouseVillage in project Rental-Information-Platform by who1sBruce.
the class HouseVillageController method edit.
/**
* 修改房源小区
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap) {
HouseVillage houseVillage = houseVillageService.selectHouseVillageById(id);
mmap.put("houseVillage", houseVillage);
return prefix + "/edit";
}
use of com.ruoyi.system.domain.HouseVillage in project Rental-Information-Platform by who1sBruce.
the class ApiHouseController method findVillageList.
/**
* @Description: 获取小區信息
* @date: 0714
* @Return: AjaxResult
*/
@GetMapping("/findVillageList")
@ResponseBody
public AjaxResult findVillageList(HouseVillage houseVillage) {
startPage();
String msg = "小區列表";
List<HouseVillage> list = houseVillageService.selectHouseVillageList(houseVillage);
AjaxResult ajaxResult = new AjaxResult(AjaxResult.Type.SUCCESS, msg, list);
return ajaxResult;
}
use of com.ruoyi.system.domain.HouseVillage in project Rental-Information-Platform by who1sBruce.
the class HouseRoomServiceImpl method insertHouseRoom.
/**
* 新增房源详情
*
* @param houseRoom 房源详情
* @return 结果
*/
@Override
public int insertHouseRoom(HouseRoom houseRoom) {
houseRoom.setCreateTime(DateUtils.getNowDate());
houseRoom.setCreateName(ShiroUtils.getSysUser().getUserName());
houseRoom.setPublishId(ShiroUtils.getUserId());
if (StringUtils.isEmpty(houseRoom.getVillageName())) {
HouseVillage houseVillage = houseVillageService.selectHouseVillageById(houseRoom.getVillageId());
houseRoom.setVillageName(houseVillage.getName());
}
if (StringUtils.isNull(houseRoom.getVillageId())) {
HouseVillage houseVillage = new HouseVillage();
houseVillage.setName(houseRoom.getVillageName());
houseVillage = houseVillageService.selectHouseVillage(houseVillage);
houseRoom.setVillageId(houseVillage.getId());
}
houseRoom.setCode(CodeUtil.getCodeByUUId());
return houseRoomMapper.insertHouseRoom(houseRoom);
}
Aggregations