package com.panzhihua.service_community.api;
|
|
import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO;
|
import com.panzhihua.common.model.dtos.community.PageComStreetDTO;
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.common.model.vos.community.ComMngVillageVO;
|
import com.panzhihua.common.model.vos.community.ComStreetVO;
|
import com.panzhihua.service_community.service.ComMngVillageService;
|
import com.panzhihua.service_community.service.ComStreetService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
import javax.validation.Valid;
|
import java.util.List;
|
|
/**
|
* @Author: llming
|
* @Description: 实有房屋管理
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/")
|
public class ComMngVillageApi {
|
@Resource
|
private ComMngVillageService comMngVillageService;
|
|
/**
|
* 新增实有房屋
|
* @param comMngVillageVO 新增信息
|
* @return 新增结果
|
*/
|
@PostMapping("addvillage")
|
@Transactional(rollbackFor = Exception.class)
|
public R addVillage(@Valid @RequestBody ComMngVillageVO comMngVillageVO) {
|
R r = comMngVillageService.addComMngVillage(comMngVillageVO);
|
return R.ok(r);
|
}
|
|
/**
|
* 分页查询实有房屋
|
* @param pageComMngVillageDTO 查询条件
|
* @return 新增结果
|
*/
|
@PostMapping("pagevillage")
|
public R pageVillage(@RequestBody PageComMngVillageDTO pageComMngVillageDTO) {
|
R r = comMngVillageService.pageComMngVillage(pageComMngVillageDTO);
|
return R.ok(r);
|
}
|
|
/**
|
* 查询实有房屋
|
* @param comMngVillageVO 查询条件
|
* @return 新增结果
|
*/
|
@PostMapping("listvillage")
|
public R listVillage(@RequestBody ComMngVillageVO comMngVillageVO) {
|
R r = comMngVillageService.listComMngVillage(comMngVillageVO);
|
return R.ok(r);
|
}
|
|
/**
|
* 删除实有房屋
|
* @param Ids 动态id
|
* @return 删除结果
|
*/
|
@PostMapping("deletevillage")
|
@Transactional(rollbackFor = Exception.class)
|
public R delectVillage(@RequestBody List<Long> Ids) {
|
R r = comMngVillageService.delecComMngVillage(Ids);
|
return R.ok(r);
|
}
|
|
}
|