package com.panzhihua.service_community.api;
|
|
import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO;
|
import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO;
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.service_community.service.ComPropertyPublicityService;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
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 lombok.extern.slf4j.Slf4j;
|
|
import javax.annotation.Resource;
|
|
/**
|
* @title: ComPropertyPublicityApi
|
* @projectName: 成都呐喊信息技术有限公司-智慧社区项目
|
* @description: 物业宣传相关接口
|
* @author: hans
|
* @date: 2021/11/11 10:08
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/property/publicity")
|
public class ComPropertyPublicityApi {
|
|
@Resource
|
private ComPropertyPublicityService comPropertyPublicityService;
|
|
/**
|
* 分页查询物业宣传
|
* @param pageComPropertyPublicityDTO
|
* @return
|
*/
|
@PostMapping("/page")
|
public R pageComPropertyPublicity(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO) {
|
return comPropertyPublicityService.pageComPropertyPublicity(pageComPropertyPublicityDTO);
|
}
|
|
/**
|
* 新增物业宣传
|
* @param comPropertyPublicityDTO
|
* @return
|
*/
|
@PostMapping("/add")
|
public R addComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO){
|
return comPropertyPublicityService.addComPropertyPublicity(comPropertyPublicityDTO);
|
}
|
|
/**
|
* 修改物业宣传
|
* @param comPropertyPublicityDTO
|
* @return
|
*/
|
@PostMapping("/update")
|
public R updateComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO) {
|
return comPropertyPublicityService.updateComPropertyPublicity(comPropertyPublicityDTO);
|
}
|
|
/**
|
* 查看物业宣传信息
|
* @param id
|
* @return
|
*/
|
@GetMapping("/get")
|
public R getComPropertyPublicity(@RequestParam("id") Long id) {
|
return comPropertyPublicityService.getComPropertyPublicity(id);
|
}
|
|
/**
|
* 删除物业宣传
|
* @param id
|
* @return
|
*/
|
@DeleteMapping("/delete")
|
public R deleteComPropertyPublicity(@RequestParam("id") Long id) {
|
return comPropertyPublicityService.deleteComPropertyPublicity(id);
|
}
|
|
/**
|
* 物业公司列表
|
* @param communityId
|
* @return
|
*/
|
@GetMapping("/list/property")
|
public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId,
|
@RequestParam("communityId") Long communityId) {
|
return comPropertyPublicityService.listProperty(villageId, communityId);
|
}
|
/**
|
* 分页查询物业宣传-小程序
|
* @param pageComPropertyPublicityDTO
|
* @return
|
*/
|
@PostMapping("/page/applet")
|
public R pageComPropertyPublicityApplet(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO) {
|
return comPropertyPublicityService.pageComPropertyPublicityApplet(pageComPropertyPublicityDTO);
|
}
|
|
/**
|
* 增加物业宣传浏览量
|
* @param id
|
* @return
|
*/
|
@GetMapping("/incr-view")
|
public R incrPropertyPublicityView(@RequestParam("id") Long id) {
|
return comPropertyPublicityService.incrView(id);
|
}
|
}
|