package org.springblade.modules.feign;

import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.modules.entity.CyryEntity;
import org.springblade.modules.entity.SydwEntity;
import org.springblade.modules.service.CyryService;
import org.springblade.modules.service.SydwService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class SydwClientImpl implements SydwFeign {

	private SydwService sydwService;

	private CyryService cyryService;

	@Override
	@PostMapping(API_PREFIX + "/sydwSave")
	public R sydwSave(@RequestBody SydwEntity sydwEntity) {
		return R.data(sydwService.save(sydwEntity));
	}

	@Override
	@PostMapping(API_PREFIX + "/cyrySave")
	public R cyrySave(@RequestBody CyryEntity cyryEntity) {
		return R.data(cyryService.save(cyryEntity));
	}
}
