package cn.com.ty.lift.system.user.controller;

import cn.com.ty.lift.system.user.dao.entity.model.PropertyUserRequest;
import cn.com.ty.lift.system.user.service.IPropertyUserService;
import cn.com.xwy.boot.web.dto.RestResponse;
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;

/**
 * @author huangyuan
 * @date 2020-01-05
 * @description
 */
@RestController
@RequestMapping("/property")
public class PropertyUserController {

    @Resource
    private IPropertyUserService propertyUserService;

    /**
     * @param
     * @return
     * @description 物业用户列表
     * @date 2020-01-06 09:08
     */
    @RequestMapping("/list")
    public RestResponse list(@RequestBody PropertyUserRequest propertyUserRequest) {
        return propertyUserService.list(propertyUserRequest);
    }

    /**
     * @param
     * @return
     * @description 取消权限
     * @date 2020-01-06 16:45
     */
    @PostMapping("/cancelPermission")
    public RestResponse cancelPermission(@RequestBody PropertyUserRequest propertyUserRequest) {
        return propertyUserService.cancelPermission(propertyUserRequest);
    }
}
