package org.springblade.demo.feign;

import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.demo.entity.Blog;
import org.springblade.demo.service.BlogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class BlogClientImpl implements BlogClient {

	private BlogService blogService;

	@Override
	@GetMapping(API_PREFIX + "/detail")
	public R<Blog> detail(Integer id) {
		return R.data(blogService.getById(id));
	}
}
