package org.springblade.modules.feign;

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

@RestController
@AllArgsConstructor
public class RhzfJwrkClientImpl implements RhzfJwrkFeign {

	private RhzfRyJwrkService rhzfRyJwrkService;

	@Override
	@PostMapping(API_PREFIX + "/jwrkSave")
	public R jwrkSave(RyJwrkEntity ryJwrkEntity) {
		return R.data(rhzfRyJwrkService.save(ryJwrkEntity));
	}

	@Override
	@PostMapping(API_PREFIX + "/jwrkUpdate")
	public R jwrkUpdate(RyJwrkEntity ryJwrkEntity) {
		return R.data(rhzfRyJwrkService.updateById(ryJwrkEntity));
	}
}
