package org.security.feign;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.security.desk.feign.IXYunClient;
import org.security.desk.xyun.res.MsgResponseBody;
import org.security.xyun.service.IXYunService;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@AllArgsConstructor
@Slf4j
@RestController
public class XYunClient implements IXYunClient {
	private final IXYunService xYunService;

	@Override
	@GetMapping(SEND_MESSAGE_TO_XYUN)
	public R<MsgResponseBody> sendMessageToXYun(String to, String msg) {
		return xYunService.sendMessageToXYun(to, msg);
	}
}
