package org.springblade.modules.feign;

import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.modules.entity.RyWlrkEntity;
import org.springblade.modules.service.RhzfRyWlrkService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class RhzfWlrkClientImpl implements RhzfWlrkFeign {

	private RhzfRyWlrkService rhzfRyWlrkService;

	@Override
	@PostMapping(API_PREFIX + "/wlrkSave")
	public R wlrkSave(RyWlrkEntity ryWlrkEntity) {
		return R.data(rhzfRyWlrkService.save(ryWlrkEntity));
	}

	@Override
	@PostMapping(API_PREFIX + "/wlrkUpdate")
	public R wlrkUpdate(RyWlrkEntity ryWlrkEntity) {
		return R.data(rhzfRyWlrkService.updateById(ryWlrkEntity));
	}
}
