package com.blueland.render.rest;


import cn.hutool.core.bean.BeanUtil;
import com.blueland.bo.SysPvlogEntity;
import com.blueland.core.util.UserUtils;
import com.blueland.model.TPfSysPvlog;
import com.blueland.result.R;
import com.blueland.service.ISysPvlogService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(value = "sysPvlog")
@RestController
@RequestMapping(value = "/api/sysPvlog")
public class SysPvlogRest {
	@Autowired
	private ISysPvlogService sysPvlogService;

	/** 
	 * 新增对象
	 **/
	@RequestMapping(value = "save",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
	@ResponseBody
	@CrossOrigin
	public R<SysPvlogEntity> save(@RequestBody SysPvlogEntity model)  {
		TPfSysPvlog pvlog = BeanUtil.copyProperties(model, TPfSysPvlog.class);
		pvlog.setAppId(UserUtils.getTenantId());
		sysPvlogService.save(pvlog);
		return R.ok(model);
	}

}



