package org.springblade.modules.feign;

import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.modules.entity.FwInfoEntity;
import org.springblade.modules.service.RhzfFwInfoService;
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 RhzfFwClientImpl implements RhzfFwFeign{

	private RhzfFwInfoService rhzfFwInfoService;

	@Override
	@PostMapping(API_PREFIX + "/fwSave")
	public R fwSave(@RequestBody FwInfoEntity fwInfoEntity) {
		return R.data(rhzfFwInfoService.save(fwInfoEntity));
	}

	@Override
	@PostMapping(API_PREFIX + "/fwUpdateById")
	public R fwUpdateById(FwInfoEntity fwInfoEntity) {
		return R.data(rhzfFwInfoService.updateById(fwInfoEntity));
	}
}
