package org.springblade.app.controller;

import lombok.RequiredArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.estate.dto.NoticeDTO;
import org.springblade.estate.entity.Notice;
import org.springblade.estate.feign.INoticeClient;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created By lidexi in 2021/4/29
 **/
@RestController
@RequestMapping("/app/notice")
@RequiredArgsConstructor
public class NoticeController {


	private final INoticeClient noticeClient;

	@PostMapping(value = "/noticeList")
	public R getNoticeList(@RequestBody NoticeDTO noticeDto){
		List<Notice> list = this.noticeClient.getListByResidentialId(noticeDto);
		return R.data(list);
	}
}
