package com.blueland.render.rest;

import javax.servlet.http.HttpServletRequest;

import com.blueland.result.R;
import com.blueland.service.ISysOplogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.blueland.core.util.LogUtil;
import com.blueland.bo.SysOplogEntity;

import io.swagger.annotations.Api;

@Api(value = "sysOplog")
@RestController
@RequestMapping(value = "/sysOplog")
public class SysOplogRest {
	@Autowired
	private ISysOplogService sysOplogService;
		
	/** 
	 * 新增操作日志
	 **/
	@RequestMapping(value = "",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
	@ResponseBody
	@CrossOrigin
	public R<SysOplogEntity> save(HttpServletRequest request, @RequestBody SysOplogEntity model)  {
		LogUtil.addSysOplog4Render(request, model.getUserId(), model.getUserName(), model.getBizId(), 
				model.getBizType(), model.getType(), model.getContent(),
				model.getStatus(), model.getAppId(), model.getRemark());
		return R.ok(model);
	}
	
	
}



