package com.sptg.third.api.feigns.grid;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.dto.BaseUser;
import com.sptg.estate.api.entity.*;
import com.sptg.permissions.api.entity.Organization;
import com.sptg.third.api.feigns.grid.fallback.GridEstateFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zwx
 * @create 2020/11/28 19:40
 */
@FeignClient(value = "smart-house-third", fallbackFactory = GridEstateFeignFallbackFactory.class)
public interface GridEstateFeign {

    /**
     * 推送社区到网格
     * @param agency
     * @return
     */
    @PostMapping(value = "/third/grid/estate/agency/push")
    public ResultBean<String> gridAgencyPush(@RequestBody Agency agency);

    /**
     * 推送小区到网格
     * @param residential
     * @return
     */
    @PostMapping(value = "/third/grid/estate/residential/push")
    public ResultBean<String> gridResidentialPush(@RequestBody Residential residential);

    /**
     * 推送楼栋到网格
     * @param building
     * @return
     */
    @PostMapping(value = "/third/grid/estate/building/push")
    public ResultBean<String> gridBuildingPush(@RequestBody Building building);

    /**
     * 推送单元到网格
     * @param unit
     * @return
     */
    @PostMapping(value = "/third/grid/estate/unit/push")
    public ResultBean<String> gridUnitPush(@RequestBody Unit unit);

    /**
     * 推送楼层到网格
     * @param floor
     * @return
     */
    @PostMapping(value = "/third/grid/estate/floor/push")
    public ResultBean<String> gridFloorPush(@RequestBody Floor floor);


    /**
     * 推送房间到网格
     * @param room
     * @return
     */
    @PostMapping(value = "/third/grid/estate/room/push")
    public ResultBean<String> gridRoomPush(@RequestBody Room room);

    /**
     * 推送人员到网格
     * @param applyUser
     * @return
     */
    @PostMapping(value = "/third/grid/estate/user/push")
    public ResultBean<String> gridUserPush(@RequestBody ApplyUser applyUser);

    @PostMapping(value = "/third/grid/estate/repair/push")
    public ResultBean<String> gridEstateRepairPush(@RequestBody EstateRepair estateRepair);
}
