package com.panzhihua.applets.api;
|
|
import javax.annotation.Resource;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
import org.springframework.web.bind.annotation.GetMapping;
|
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.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import com.panzhihua.common.controller.BaseController;
|
import com.panzhihua.common.model.dtos.property.CommonPage;
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.common.model.vos.community.ComPropertyVO;
|
import com.panzhihua.common.service.community.CommunityService;
|
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
|
/**
|
* @author zzj
|
*/
|
@Slf4j
|
@Api(tags = {"物业公司"})
|
@RestController
|
@RequestMapping("/comProperty")
|
public class ComPropertyApi extends BaseController {
|
@Resource
|
private CommunityService communityService;
|
|
/**
|
* 分页查询所有数据
|
*
|
* @param commonPage 查询实体
|
* @return 所有数据
|
*/
|
@ApiOperation(value = "物业公司列表",response = ComPropertyVO.class)
|
@PostMapping("queryAll")
|
public R selectAll(@RequestBody CommonPage commonPage) {
|
commonPage.setParamId(this.getCommunityId());
|
return this.communityService.comPropertySelectAll(commonPage);
|
}
|
|
@ApiOperation(value = "物业公司详情", response = ComPropertyVO.class)
|
@ApiImplicitParam(name = "id", value = "物业公司id", required = true)
|
@GetMapping("detail")
|
public R detailProperty(@RequestParam("id") Long id) {
|
return this.communityService.detailProperty(id);
|
}
|
}
|