package com.landtool.lanbase.modules.api.controller;
|
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiParam;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import com.landtool.lanbase.modules.log.service.LogActionService;
|
|
/**
|
* @Description: 系统模块操作日志提供的api
|
*
|
*/
|
@Controller
|
@RequestMapping(path = "/api/log/action")
|
@Api(value = "", tags = {"系统模块操作日志相关接口"})
|
public class LogActionApiController {
|
|
@Autowired
|
private LogActionService logActionService;
|
|
/*
|
* 操作日志写入
|
*/
|
@PostMapping(path="/addAction")
|
@ApiOperation(
|
value = "操作日志写入",
|
notes = ""
|
)
|
@ResponseBody
|
public String addAction(@ApiParam(name="userid",value="用户Id",required=true)
|
@RequestParam(name = "userid")Long userid,
|
@ApiParam(name="appid",value="应用程序Id",required=true)
|
@RequestParam(name = "appid")Long appid,
|
@ApiParam(name="largemodel",value="所属大模块名称largemodel",required=true)
|
@RequestParam(name = "largemodel")String largemodel,
|
@ApiParam(name="smallmodel",value="具体模块名称smallmodel",required=true)
|
@RequestParam(name = "smallmodel")String smallmodel,
|
@ApiParam(name="requesturl",value="请求网址requesturl",required=true)
|
@RequestParam(name = "requesturl")String requesturl,
|
@ApiParam(name="requestip",value="请求客户端IP地址requestip",required=true)
|
@RequestParam(name = "requestip")String requestip,
|
@ApiParam(name="remark",value="操作说明remark",required=true)
|
@RequestParam(name = "remark")String remark,
|
@ApiParam(name="actiontype",value="操作类型actiontype",required=true)
|
@RequestParam(name = "actiontype")String actiontype,
|
@ApiParam(name="resourceid",value="资源ID")
|
@RequestParam(name = "resourceid",required=false)Integer resourceid,
|
@ApiParam(name="title",value="资源名称")
|
@RequestParam(name = "title", required = false)String title){
|
|
logActionService.addAction(userid, appid, largemodel, smallmodel, requesturl, requestip, remark, actiontype,resourceid,title);
|
|
return "添加成功";
|
|
}
|
}
|